]> git.proxmox.com Git - rustc.git/blame - RELEASES.md
rebase patches
[rustc.git] / RELEASES.md
CommitLineData
c295e0f8
XL
1Version 1.57.0 (2021-12-02)
2==========================
3
4Language
5--------
6
7- [Macro attributes may follow `#[derive]` and will see the original (pre-`cfg`) input.][87220]
8- [Accept curly-brace macros in expressions, like `m!{ .. }.method()` and `m!{ .. }?`.][88690]
9- [Allow panicking in constant evaluation.][89508]
10
11Compiler
12--------
13
14- [Create more accurate debuginfo for vtables.][89597]
15- [Add `armv6k-nintendo-3ds` at Tier 3\*.][88529]
16- [Add `armv7-unknown-linux-uclibceabihf` at Tier 3\*.][88952]
17- [Add `m68k-unknown-linux-gnu` at Tier 3\*.][88321]
18- [Add SOLID targets at Tier 3\*:][86191] `aarch64-kmc-solid_asp3`, `armv7a-kmc-solid_asp3-eabi`, `armv7a-kmc-solid_asp3-eabihf`
19
20\* Refer to Rust's [platform support page][platform-support-doc] for more
21 information on Rust's tiered platform support.
22
23Libraries
24---------
25
26- [Avoid allocations and copying in `Vec::leak`][89337]
27- [Add `#[repr(i8)]` to `Ordering`][89507]
28- [Optimize `File::read_to_end` and `read_to_string`][89582]
29- [Update to Unicode 14.0][89614]
30- [Many more functions are marked `#[must_use]`][89692], producing a warning
31 when ignoring their return value. This helps catch mistakes such as expecting
32 a function to mutate a value in place rather than return a new value.
33
34Stabilised APIs
35---------------
36
37- [`[T; N]::as_mut_slice`][`array::as_mut_slice`]
38- [`[T; N]::as_slice`][`array::as_slice`]
39- [`collections::TryReserveError`]
40- [`HashMap::try_reserve`]
41- [`HashSet::try_reserve`]
42- [`String::try_reserve`]
43- [`String::try_reserve_exact`]
44- [`Vec::try_reserve`]
45- [`Vec::try_reserve_exact`]
46- [`VecDeque::try_reserve`]
47- [`VecDeque::try_reserve_exact`]
48- [`Iterator::map_while`]
49- [`iter::MapWhile`]
50- [`proc_macro::is_available`]
51- [`Command::get_program`]
52- [`Command::get_args`]
53- [`Command::get_envs`]
54- [`Command::get_current_dir`]
55- [`CommandArgs`]
56- [`CommandEnvs`]
57
58These APIs are now usable in const contexts:
59
60- [`hint::unreachable_unchecked`]
61
62Cargo
63-----
64
65- [Stabilize custom profiles][cargo/9943]
66
67Compatibility notes
68-------------------
69
70Internal changes
71----------------
72These changes provide no direct user facing benefits, but represent significant
73improvements to the internals and overall performance of rustc
74and related tools.
75
76- [Added an experimental backend for codegen with `libgccjit`.][87260]
77
78[86191]: https://github.com/rust-lang/rust/pull/86191/
79[87220]: https://github.com/rust-lang/rust/pull/87220/
80[87260]: https://github.com/rust-lang/rust/pull/87260/
81[88243]: https://github.com/rust-lang/rust/pull/88243/
82[88321]: https://github.com/rust-lang/rust/pull/88321/
83[88529]: https://github.com/rust-lang/rust/pull/88529/
84[88690]: https://github.com/rust-lang/rust/pull/88690/
85[88952]: https://github.com/rust-lang/rust/pull/88952/
86[89337]: https://github.com/rust-lang/rust/pull/89337/
87[89507]: https://github.com/rust-lang/rust/pull/89507/
88[89508]: https://github.com/rust-lang/rust/pull/89508/
89[89582]: https://github.com/rust-lang/rust/pull/89582/
90[89597]: https://github.com/rust-lang/rust/pull/89597/
91[89614]: https://github.com/rust-lang/rust/pull/89614/
92[89692]: https://github.com/rust-lang/rust/issues/89692/
93[cargo/9943]: https://github.com/rust-lang/cargo/pull/9943/
94[`array::as_mut_slice`]: https://doc.rust-lang.org/std/primitive.array.html#method.as_mut_slice
95[`array::as_slice`]: https://doc.rust-lang.org/std/primitive.array.html#method.as_slice
96[`collections::TryReserveError`]: https://doc.rust-lang.org/std/collections/struct.TryReserveError.html
97[`HashMap::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_map/struct.HashMap.html#method.try_reserve
98[`HashSet::try_reserve`]: https://doc.rust-lang.org/std/collections/hash_set/struct.HashSet.html#method.try_reserve
99[`String::try_reserve`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve
100[`String::try_reserve_exact`]: https://doc.rust-lang.org/alloc/string/struct.String.html#method.try_reserve_exact
101[`Vec::try_reserve`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve
102[`Vec::try_reserve_exact`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.try_reserve_exact
103[`VecDeque::try_reserve`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve
104[`VecDeque::try_reserve_exact`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.try_reserve_exact
105[`Iterator::map_while`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.map_while
106[`iter::MapWhile`]: https://doc.rust-lang.org/std/iter/struct.MapWhile.html
107[`proc_macro::is_available`]: https://doc.rust-lang.org/proc_macro/fn.is_available.html
108[`Command::get_program`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_program
109[`Command::get_args`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_args
110[`Command::get_envs`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_envs
111[`Command::get_current_dir`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.get_current_dir
112[`CommandArgs`]: https://doc.rust-lang.org/std/process/struct.CommandArgs.html
113[`CommandEnvs`]: https://doc.rust-lang.org/std/process/struct.CommandEnvs.html
114
115Version 1.56.1 (2021-11-01)
116===========================
117
118- New lints to detect the presence of bidirectional-override Unicode
119 codepoints in the compiled source code ([CVE-2021-42574])
120
121[CVE-2021-42574]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2021-42574
122
dc3f5686
XL
123Version 1.56.0 (2021-10-21)
124========================
125
126Language
127--------
128
129- [The 2021 Edition is now stable.][rust#88100]
130 See [the edition guide][rust-2021-edition-guide] for more details.
131- [The pattern in `binding @ pattern` can now also introduce new bindings.][rust#85305]
132- [Union field access is permitted in `const fn`.][rust#85769]
133
134[rust-2021-edition-guide]: https://doc.rust-lang.org/nightly/edition-guide/rust-2021/index.html
135
136Compiler
137--------
138
139- [Upgrade to LLVM 13.][rust#87570]
140- [Support memory, address, and thread sanitizers on aarch64-unknown-freebsd.][rust#88023]
141- [Allow specifying a deployment target version for all iOS targets][rust#87699]
142- [Warnings can be forced on with `--force-warn`.][rust#87472]
143 This feature is primarily intended for usage by `cargo fix`, rather than end users.
144- [Promote `aarch64-apple-ios-sim` to Tier 2\*.][rust#87760]
145- [Add `powerpc-unknown-freebsd` at Tier 3\*.][rust#87370]
146- [Add `riscv32imc-esp-espidf` at Tier 3\*.][rust#87666]
147
148\* Refer to Rust's [platform support page][platform-support-doc] for more
149information on Rust's tiered platform support.
150
151Libraries
152---------
153
154- [Allow writing of incomplete UTF-8 sequences via stdout/stderr on Windows.][rust#83342]
155 The Windows console still requires valid Unicode, but this change allows
156 splitting a UTF-8 character across multiple write calls. This allows, for
157 instance, programs that just read and write data buffers (e.g. copying a file
158 to stdout) without regard for Unicode or character boundaries.
159- [Prefer `AtomicU{64,128}` over Mutex for Instant backsliding protection.][rust#83093]
160 For this use case, atomics scale much better under contention.
161- [Implement `Extend<(A, B)>` for `(Extend<A>, Extend<B>)`][rust#85835]
162- [impl Default, Copy, Clone for std::io::Sink and std::io::Empty][rust#86744]
163- [`impl From<[(K, V); N]>` for all collections.][rust#84111]
164- [Remove `P: Unpin` bound on impl Future for Pin.][rust#81363]
165- [Treat invalid environment variable names as non-existent.][rust#86183]
166 Previously, the environment functions would panic if given a variable name
167 with an internal null character or equal sign (`=`). Now, these functions will
168 just treat such names as non-existent variables, since the OS cannot represent
169 the existence of a variable with such a name.
170
171Stabilised APIs
172---------------
173
174- [`std::os::unix::fs::chroot`]
175- [`UnsafeCell::raw_get`]
176- [`BufWriter::into_parts`]
177- [`core::panic::{UnwindSafe, RefUnwindSafe, AssertUnwindSafe}`]
178 These APIs were previously stable in `std`, but are now also available in `core`.
179- [`Vec::shrink_to`]
180- [`String::shrink_to`]
181- [`OsString::shrink_to`]
182- [`PathBuf::shrink_to`]
183- [`BinaryHeap::shrink_to`]
184- [`VecDeque::shrink_to`]
185- [`HashMap::shrink_to`]
186- [`HashSet::shrink_to`]
187
188These APIs are now usable in const contexts:
189
190- [`std::mem::transmute`]
191- [`[T]::first`][`slice::first`]
192- [`[T]::split_first`][`slice::split_first`]
193- [`[T]::last`][`slice::last`]
194- [`[T]::split_last`][`slice::split_last`]
195
196Cargo
197-----
198
199- [Cargo supports specifying a minimum supported Rust version in Cargo.toml.][`rust-version`]
200 This has no effect at present on dependency version selection.
201 We encourage crates to specify their minimum supported Rust version, and we encourage CI systems
c295e0f8 202 that support Rust code to include a crate's specified minimum version in the test matrix for that
dc3f5686
XL
203 crate by default.
204
205Compatibility notes
206-------------------
207
208- [Update to new argument parsing rules on Windows.][rust#87580]
209 This adjusts Rust's standard library to match the behavior of the standard
210 libraries for C/C++. The rules have changed slightly over time, and this PR
211 brings us to the latest set of rules (changed in 2008).
212- [Disallow the aapcs calling convention on aarch64][rust#88399]
213 This was already not supported by LLVM; this change surfaces this lack of
214 support with a better error message.
215- [Make `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` warn by default][rust#87385]
216- [Warn when an escaped newline skips multiple lines.][rust#87671]
217- [Calls to `libc::getpid` / `std::process::id` from `Command::pre_exec`
218 may return different values on glibc <= 2.24.][rust#81825]
219 Rust now invokes the `clone3` system call directly, when available, to use new functionality
220 available via that system call. Older versions of glibc cache the result of `getpid`, and only
221 update that cache when calling glibc's clone/fork functions, so a direct system call bypasses
222 that cache update. glibc 2.25 and newer no longer cache `getpid` for exactly this reason.
223
224Internal changes
225----------------
226These changes provide no direct user facing benefits, but represent significant
227improvements to the internals and overall performance of rustc
228and related tools.
229
230- [LLVM is compiled with PGO in published x86_64-unknown-linux-gnu artifacts.][rust#88069]
231 This improves the performance of most Rust builds.
232- [Unify representation of macros in internal data structures.][rust#88019]
233 This change fixes a host of bugs with the handling of macros by the compiler,
234 as well as rustdoc.
235
236[`std::os::unix::fs::chroot`]: https://doc.rust-lang.org/stable/std/os/unix/fs/fn.chroot.html
237[`Iterator::intersperse`]: https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html#method.intersperse
238[`Iterator::intersperse_with`]: https://doc.rust-lang.org/stable/std/iter/trait.Iterator.html#method.intersperse
239[`UnsafeCell::raw_get`]: https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.raw_get
240[`BufWriter::into_parts`]: https://doc.rust-lang.org/stable/std/io/struct.BufWriter.html#method.into_parts
241[`core::panic::{UnwindSafe, RefUnwindSafe, AssertUnwindSafe}`]: https://github.com/rust-lang/rust/pull/84662
242[`Vec::shrink_to`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.shrink_to
243[`String::shrink_to`]: https://doc.rust-lang.org/stable/std/string/struct.String.html#method.shrink_to
244[`OsString::shrink_to`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.shrink_to
245[`PathBuf::shrink_to`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.shrink_to
246[`BinaryHeap::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.shrink_to
247[`VecDeque::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.shrink_to
248[`HashMap::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/hash_map/struct.HashMap.html#method.shrink_to
249[`HashSet::shrink_to`]: https://doc.rust-lang.org/stable/std/collections/hash_set/struct.HashSet.html#method.shrink_to
250[`std::mem::transmute`]: https://doc.rust-lang.org/stable/std/mem/fn.transmute.html
251[`slice::first`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.first
252[`slice::split_first`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_first
253[`slice::last`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.last
254[`slice::split_last`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.split_last
255[`rust-version`]: https://doc.rust-lang.org/nightly/cargo/reference/manifest.html#the-rust-version-field
256[rust#87671]: https://github.com/rust-lang/rust/pull/87671
257[rust#86183]: https://github.com/rust-lang/rust/pull/86183
258[rust#87385]: https://github.com/rust-lang/rust/pull/87385
259[rust#88100]: https://github.com/rust-lang/rust/pull/88100
260[rust#86860]: https://github.com/rust-lang/rust/pull/86860
261[rust#84039]: https://github.com/rust-lang/rust/pull/84039
262[rust#86492]: https://github.com/rust-lang/rust/pull/86492
263[rust#88363]: https://github.com/rust-lang/rust/pull/88363
264[rust#85305]: https://github.com/rust-lang/rust/pull/85305
265[rust#87832]: https://github.com/rust-lang/rust/pull/87832
266[rust#88069]: https://github.com/rust-lang/rust/pull/88069
267[rust#87472]: https://github.com/rust-lang/rust/pull/87472
268[rust#87699]: https://github.com/rust-lang/rust/pull/87699
269[rust#87570]: https://github.com/rust-lang/rust/pull/87570
270[rust#88023]: https://github.com/rust-lang/rust/pull/88023
271[rust#87760]: https://github.com/rust-lang/rust/pull/87760
272[rust#87370]: https://github.com/rust-lang/rust/pull/87370
273[rust#87580]: https://github.com/rust-lang/rust/pull/87580
274[rust#83342]: https://github.com/rust-lang/rust/pull/83342
275[rust#83093]: https://github.com/rust-lang/rust/pull/83093
276[rust#88177]: https://github.com/rust-lang/rust/pull/88177
277[rust#88548]: https://github.com/rust-lang/rust/pull/88548
278[rust#88551]: https://github.com/rust-lang/rust/pull/88551
279[rust#88299]: https://github.com/rust-lang/rust/pull/88299
280[rust#88220]: https://github.com/rust-lang/rust/pull/88220
281[rust#85835]: https://github.com/rust-lang/rust/pull/85835
282[rust#86879]: https://github.com/rust-lang/rust/pull/86879
283[rust#86744]: https://github.com/rust-lang/rust/pull/86744
284[rust#84662]: https://github.com/rust-lang/rust/pull/84662
285[rust#86593]: https://github.com/rust-lang/rust/pull/86593
286[rust#81050]: https://github.com/rust-lang/rust/pull/81050
287[rust#81363]: https://github.com/rust-lang/rust/pull/81363
288[rust#84111]: https://github.com/rust-lang/rust/pull/84111
289[rust#85769]: https://github.com/rust-lang/rust/pull/85769#issuecomment-854363720
290[rust#88490]: https://github.com/rust-lang/rust/pull/88490
291[rust#88269]: https://github.com/rust-lang/rust/pull/88269
292[rust#84176]: https://github.com/rust-lang/rust/pull/84176
293[rust#88399]: https://github.com/rust-lang/rust/pull/88399
294[rust#88227]: https://github.com/rust-lang/rust/pull/88227
295[rust#88200]: https://github.com/rust-lang/rust/pull/88200
296[rust#82776]: https://github.com/rust-lang/rust/pull/82776
297[rust#88077]: https://github.com/rust-lang/rust/pull/88077
298[rust#87728]: https://github.com/rust-lang/rust/pull/87728
299[rust#87050]: https://github.com/rust-lang/rust/pull/87050
300[rust#87619]: https://github.com/rust-lang/rust/pull/87619
301[rust#81825]: https://github.com/rust-lang/rust/pull/81825#issuecomment-808406918
302[rust#88019]: https://github.com/rust-lang/rust/pull/88019
303[rust#87666]: https://github.com/rust-lang/rust/pull/87666
304
136023e0
XL
305Version 1.55.0 (2021-09-09)
306============================
307
308Language
309--------
310- [You can now write open "from" range patterns (`X..`), which will start at `X` and
311 will end at the maximum value of the integer.][83918]
312- [You can now explicitly import the prelude of different editions
313 through `std::prelude` (e.g. `use std::prelude::rust_2021::*;`).][86294]
314
315Compiler
316--------
317- [Added tier 3\* support for `powerpc64le-unknown-freebsd`.][83572]
318
319\* Refer to Rust's [platform support page][platform-support-doc] for more
320 information on Rust's tiered platform support.
321
322Libraries
323---------
324
325- [Updated std's float parsing to use the Eisel-Lemire algorithm.][86761]
326 These improvements should in general provide faster string parsing of floats,
327 no longer reject certain valid floating point values, and reduce
328 the produced code size for non-stripped artifacts.
329- [`string::Drain` now implements `AsRef<str>` and `AsRef<[u8]>`.][86858]
330
331Stabilised APIs
332---------------
333
334- [`Bound::cloned`]
335- [`Drain::as_str`]
336- [`IntoInnerError::into_error`]
337- [`IntoInnerError::into_parts`]
338- [`MaybeUninit::assume_init_mut`]
339- [`MaybeUninit::assume_init_ref`]
340- [`MaybeUninit::write`]
341- [`array::map`]
342- [`ops::ControlFlow`]
343- [`x86::_bittest`]
344- [`x86::_bittestandcomplement`]
345- [`x86::_bittestandreset`]
346- [`x86::_bittestandset`]
347- [`x86_64::_bittest64`]
348- [`x86_64::_bittestandcomplement64`]
349- [`x86_64::_bittestandreset64`]
350- [`x86_64::_bittestandset64`]
351
352The following previously stable functions are now `const`.
353
354- [`str::from_utf8_unchecked`]
136023e0
XL
355
356
357Cargo
358-----
359- [Cargo will now deduplicate compiler diagnostics to the terminal when invoking
360 rustc in parallel such as when using `cargo test`.][cargo/9675]
361- [The package definition in `cargo metadata` now includes the `"default_run"`
362 field from the manifest.][cargo/9550]
363- [Added `cargo d` as an alias for `cargo doc`.][cargo/9680]
364- [Added `{lib}` as formatting option for `cargo tree` to print the `"lib_name"`
365 of packages.][cargo/9663]
366
367Rustdoc
368-------
369- [Added "Go to item on exact match" search option.][85876]
370- [The "Implementors" section on traits no longer shows redundant
371 method definitions.][85970]
372- [Trait implementations are toggled open by default.][86260] This should make the
373 implementations more searchable by tools like `CTRL+F` in your browser.
374- [Intra-doc links should now correctly resolve associated items (e.g. methods)
375 through type aliases.][86334]
376- [Traits which are marked with `#[doc(hidden)]` will no longer appear in the
377 "Trait Implementations" section.][86513]
378
379
380Compatibility Notes
381-------------------
382- [std functions that return an `io::Error` will no longer use the
383 `ErrorKind::Other` variant.][85746] This is to better reflect that these
384 kinds of errors could be categorised [into newer more specific `ErrorKind`
385 variants][79965], and that they do not represent a user error.
386- [Using environment variable names with `process::Command` on Windows now
387 behaves as expected.][85270] Previously using envionment variables with
388 `Command` would cause them to be ASCII-uppercased.
389- [Rustdoc will now warn on using rustdoc lints that aren't prefixed
390 with `rustdoc::`][86849]
391
392[86849]: https://github.com/rust-lang/rust/pull/86849
393[86513]: https://github.com/rust-lang/rust/pull/86513
394[86334]: https://github.com/rust-lang/rust/pull/86334
395[86260]: https://github.com/rust-lang/rust/pull/86260
396[85970]: https://github.com/rust-lang/rust/pull/85970
397[85876]: https://github.com/rust-lang/rust/pull/85876
398[83572]: https://github.com/rust-lang/rust/pull/83572
399[86294]: https://github.com/rust-lang/rust/pull/86294
400[86858]: https://github.com/rust-lang/rust/pull/86858
401[86761]: https://github.com/rust-lang/rust/pull/86761
402[85769]: https://github.com/rust-lang/rust/pull/85769
403[85746]: https://github.com/rust-lang/rust/pull/85746
404[85305]: https://github.com/rust-lang/rust/pull/85305
405[85270]: https://github.com/rust-lang/rust/pull/85270
406[84111]: https://github.com/rust-lang/rust/pull/84111
407[83918]: https://github.com/rust-lang/rust/pull/83918
408[79965]: https://github.com/rust-lang/rust/pull/79965
409[87370]: https://github.com/rust-lang/rust/pull/87370
410[87298]: https://github.com/rust-lang/rust/pull/87298
411[cargo/9663]: https://github.com/rust-lang/cargo/pull/9663
412[cargo/9675]: https://github.com/rust-lang/cargo/pull/9675
413[cargo/9550]: https://github.com/rust-lang/cargo/pull/9550
414[cargo/9680]: https://github.com/rust-lang/cargo/pull/9680
415[cargo/9663]: https://github.com/rust-lang/cargo/pull/9663
416[`array::map`]: https://doc.rust-lang.org/stable/std/primitive.array.html#method.map
417[`Bound::cloned`]: https://doc.rust-lang.org/stable/std/ops/enum.Bound.html#method.cloned
418[`Drain::as_str`]: https://doc.rust-lang.org/stable/std/string/struct.Drain.html#method.as_str
419[`IntoInnerError::into_error`]: https://doc.rust-lang.org/stable/std/io/struct.IntoInnerError.html#method.into_error
420[`IntoInnerError::into_parts`]: https://doc.rust-lang.org/stable/std/io/struct.IntoInnerError.html#method.into_parts
421[`MaybeUninit::assume_init_mut`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_mut
422[`MaybeUninit::assume_init_ref`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_ref
423[`MaybeUninit::write`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.write
424[`Seek::rewind`]: https://doc.rust-lang.org/stable/std/io/trait.Seek.html#method.rewind
136023e0
XL
425[`ops::ControlFlow`]: https://doc.rust-lang.org/stable/std/ops/enum.ControlFlow.html
426[`str::from_utf8_unchecked`]: https://doc.rust-lang.org/stable/std/str/fn.from_utf8_unchecked.html
427[`x86::_bittest`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittest.html
428[`x86::_bittestandcomplement`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandcomplement.html
429[`x86::_bittestandreset`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandreset.html
430[`x86::_bittestandset`]: https://doc.rust-lang.org/stable/core/arch/x86/fn._bittestandset.html
431[`x86_64::_bittest64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittest64.html
432[`x86_64::_bittestandcomplement64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandcomplement64.html
433[`x86_64::_bittestandreset64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandreset64.html
434[`x86_64::_bittestandset64`]: https://doc.rust-lang.org/stable/core/arch/x86_64/fn._bittestandset64.html
435
436
17df50a5
XL
437Version 1.54.0 (2021-07-29)
438============================
439
440Language
441-----------------------
442
136023e0
XL
443- [You can now use macros for values in some built-in attributes.][83366]
444 This primarily allows you to call macros within the `#[doc]` attribute. For
445 example, to include external documentation in your crate, you can now write
446 the following:
17df50a5
XL
447 ```rust
448 #![doc = include_str!("README.md")]
449 ```
17df50a5
XL
450
451- [You can now cast between unsized slice types (and types which contain
452 unsized slices) in `const fn`.][85078]
453- [You can now use multiple generic lifetimes with `impl Trait` where the
454 lifetimes don't explicitly outlive another.][84701] In code this means
455 that you can now have `impl Trait<'a, 'b>` where as before you could
456 only have `impl Trait<'a, 'b> where 'b: 'a`.
457
458Compiler
459-----------------------
460
461- [Rustc will now search for custom JSON targets in
462 `/lib/rustlib/<target-triple>/target.json` where `/` is the "sysroot"
463 directory.][83800] You can find your sysroot directory by running
464 `rustc --print sysroot`.
465- [Added `wasm` as a `target_family` for WebAssembly platforms.][84072]
466- [You can now use `#[target_feature]` on safe functions when targeting
467 WebAssembly platforms.][84988]
468- [Improved debugger output for enums on Windows MSVC platforms.][85292]
469- [Added tier 3\* support for `bpfel-unknown-none`
470 and `bpfeb-unknown-none`.][79608]
136023e0 471- [`-Zmutable-noalias=yes`][82834] is enabled by default when using LLVM 12 or above.
17df50a5
XL
472
473\* Refer to Rust's [platform support page][platform-support-doc] for more
474 information on Rust's tiered platform support.
475
476Libraries
477-----------------------
478
479- [`panic::panic_any` will now `#[track_caller]`.][85745]
480- [Added `OutOfMemory` as a variant of `io::ErrorKind`.][84744]
481- [ `proc_macro::Literal` now implements `FromStr`.][84717]
482- [The implementations of vendor intrinsics in core::arch have been
483 significantly refactored.][83278] The main user-visible changes are
484 a 50% reduction in the size of libcore.rlib and stricter validation
485 of constant operands passed to intrinsics. The latter is technically
486 a breaking change, but allows Rust to more closely match the C vendor
487 intrinsics API.
488
489Stabilized APIs
490---------------
491
492- [`BTreeMap::into_keys`]
493- [`BTreeMap::into_values`]
494- [`HashMap::into_keys`]
495- [`HashMap::into_values`]
496- [`arch::wasm32`]
497- [`VecDeque::binary_search`]
498- [`VecDeque::binary_search_by`]
499- [`VecDeque::binary_search_by_key`]
500- [`VecDeque::partition_point`]
501
502Cargo
503-----
504
505- [Added the `--prune <spec>` option to `cargo-tree` to remove a package from
506 the dependency graph.][cargo/9520]
507- [Added the `--depth` option to `cargo-tree` to print only to a certain depth
508 in the tree ][cargo/9499]
509- [Added the `no-proc-macro` value to `cargo-tree --edges` to hide procedural
510 macro dependencies.][cargo/9488]
511- [A new environment variable named `CARGO_TARGET_TMPDIR` is available.][cargo/9375]
512 This variable points to a directory that integration tests and benches
513 can use as a "scratchpad" for testing filesystem operations.
514
515Compatibility Notes
516-------------------
517- [Mixing Option and Result via `?` is no longer permitted in closures for inferred types.][86831]
518- [Previously unsound code is no longer permitted where different constructors in branches
519 could require different lifetimes.][85574]
520- As previously mentioned the [`std::arch` instrinsics now uses stricter const checking][83278]
521 than before and may reject some previously accepted code.
522- [`i128` multiplication on Cortex M0+ platforms currently unconditionally causes overflow
523 when compiled with `codegen-units = 1`.][86063]
524
525[85574]: https://github.com/rust-lang/rust/issues/85574
526[86831]: https://github.com/rust-lang/rust/issues/86831
527[86063]: https://github.com/rust-lang/rust/issues/86063
528[86831]: https://github.com/rust-lang/rust/issues/86831
529[79608]: https://github.com/rust-lang/rust/pull/79608
530[84988]: https://github.com/rust-lang/rust/pull/84988
531[84701]: https://github.com/rust-lang/rust/pull/84701
532[84072]: https://github.com/rust-lang/rust/pull/84072
533[85745]: https://github.com/rust-lang/rust/pull/85745
534[84744]: https://github.com/rust-lang/rust/pull/84744
535[85078]: https://github.com/rust-lang/rust/pull/85078
536[84717]: https://github.com/rust-lang/rust/pull/84717
537[83800]: https://github.com/rust-lang/rust/pull/83800
538[83366]: https://github.com/rust-lang/rust/pull/83366
539[83278]: https://github.com/rust-lang/rust/pull/83278
540[85292]: https://github.com/rust-lang/rust/pull/85292
136023e0 541[82834]: https://github.com/rust-lang/rust/pull/82834
17df50a5
XL
542[cargo/9520]: https://github.com/rust-lang/cargo/pull/9520
543[cargo/9499]: https://github.com/rust-lang/cargo/pull/9499
544[cargo/9488]: https://github.com/rust-lang/cargo/pull/9488
545[cargo/9375]: https://github.com/rust-lang/cargo/pull/9375
546[`BTreeMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_keys
547[`BTreeMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.into_values
548[`HashMap::into_keys`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_keys
549[`HashMap::into_values`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.into_values
550[`arch::wasm32`]: https://doc.rust-lang.org/core/arch/wasm32/index.html
551[`VecDeque::binary_search`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search
552[`VecDeque::binary_search_by`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by
553
554[`VecDeque::binary_search_by_key`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.binary_search_by_key
555
556[`VecDeque::partition_point`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.partition_point
557
cdc7bbd5
XL
558Version 1.53.0 (2021-06-17)
559============================
560
561Language
562-----------------------
563- [You can now use unicode for identifiers.][83799] This allows multilingual
564 identifiers but still doesn't allow glyphs that are not considered characters
565 such as `◆` or `🦀`. More specifically you can now use any identifier that
566 matches the UAX #31 "Unicode Identifier and Pattern Syntax" standard. This
567 is the same standard as languages like Python, however Rust uses NFC
568 normalization which may be different from other languages.
569- [You can now specify "or patterns" inside pattern matches.][79278]
570 Previously you could only use `|` (OR) on complete patterns. E.g.
571 ```rust
572 let x = Some(2u8);
573 // Before
574 matches!(x, Some(1) | Some(2));
575 // Now
576 matches!(x, Some(1 | 2));
577 ```
578- [Added the `:pat_param` `macro_rules!` matcher.][83386] This matcher
579 has the same semantics as the `:pat` matcher. This is to allow `:pat`
580 to change semantics to being a pattern fragment in a future edition.
581
582Compiler
583-----------------------
584- [Updated the minimum external LLVM version to LLVM 10.][83387]
585- [Added Tier 3\* support for the `wasm64-unknown-unknown` target.][80525]
586- [Improved debuginfo for closures and async functions on Windows MSVC.][83941]
587
588\* Refer to Rust's [platform support page][platform-support-doc] for more
589information on Rust's tiered platform support.
590
591Libraries
592-----------------------
593- [Abort messages will now forward to `android_set_abort_message` on
594 Android platforms when available.][81469]
595- [`slice::IterMut<'_, T>` now implements `AsRef<[T]>`][82771]
596- [Arrays of any length now implement `IntoIterator`.][84147]
597 Currently calling `.into_iter()` as a method on an array will
598 return `impl Iterator<Item=&T>`, but this may change in a
599 future edition to change `Item` to `T`. Calling `IntoIterator::into_iter`
600 directly on arrays will provide `impl Iterator<Item=T>` as expected.
601- [`leading_zeros`, and `trailing_zeros` are now available on all
602 `NonZero` integer types.][84082]
603- [`{f32, f64}::from_str` now parse and print special values
136023e0 604 (`NaN`, `-0`) according to IEEE 754.][78618]
cdc7bbd5
XL
605- [You can now index into slices using `(Bound<usize>, Bound<usize>)`.][77704]
606- [Add the `BITS` associated constant to all numeric types.][82565]
607
608Stabilised APIs
609---------------
610- [`AtomicBool::fetch_update`]
611- [`AtomicPtr::fetch_update`]
612- [`BTreeMap::retain`]
613- [`BTreeSet::retain`]
614- [`BufReader::seek_relative`]
615- [`DebugStruct::non_exhaustive`]
616- [`Duration::MAX`]
617- [`Duration::ZERO`]
618- [`Duration::is_zero`]
619- [`Duration::saturating_add`]
620- [`Duration::saturating_mul`]
621- [`Duration::saturating_sub`]
622- [`ErrorKind::Unsupported`]
623- [`Option::insert`]
624- [`Ordering::is_eq`]
625- [`Ordering::is_ge`]
626- [`Ordering::is_gt`]
627- [`Ordering::is_le`]
628- [`Ordering::is_lt`]
629- [`Ordering::is_ne`]
630- [`OsStr::is_ascii`]
631- [`OsStr::make_ascii_lowercase`]
632- [`OsStr::make_ascii_uppercase`]
633- [`OsStr::to_ascii_lowercase`]
634- [`OsStr::to_ascii_uppercase`]
635- [`Peekable::peek_mut`]
636- [`Rc::decrement_strong_count`]
637- [`Rc::increment_strong_count`]
638- [`Vec::extend_from_within`]
639- [`array::from_mut`]
640- [`array::from_ref`]
cdc7bbd5
XL
641- [`cmp::max_by_key`]
642- [`cmp::max_by`]
643- [`cmp::min_by_key`]
644- [`cmp::min_by`]
645- [`f32::is_subnormal`]
646- [`f64::is_subnormal`]
647
648Cargo
649-----------------------
650- [Cargo now supports git repositories where the default `HEAD` branch is not
651 "master".][cargo/9392] This also includes a switch to the version 3 `Cargo.lock` format
652 which can handle default branches correctly.
653- [macOS targets now default to `unpacked` split-debuginfo.][cargo/9298]
654- [The `authors` field is no longer included in `Cargo.toml` for new
655 projects.][cargo/9282]
656
657Rustdoc
658-----------------------
659- [Added the `rustdoc::bare_urls` lint that warns when you have URLs
660 without hyperlinks.][81764]
661
662Compatibility Notes
663-------------------
664- [Implement token-based handling of attributes during expansion][82608]
665- [`Ipv4::from_str` will now reject octal format IP addresses in addition
666 to rejecting hexadecimal IP addresses.][83652] The octal format can lead
667 to confusion and potential security vulnerabilities and [is no
668 longer recommended][ietf6943].
17df50a5
XL
669- [The added `BITS` constant may conflict with external definitions.][85667]
670 In particular, this was known to be a problem in the `lexical-core` crate,
671 but they have published fixes for semantic versions 0.4 through 0.7. To
672 update this dependency alone, use `cargo update -p lexical-core`.
673- Incremental compilation remains off by default, unless one uses the `RUSTC_FORCE_INCREMENTAL=1` environment variable added in 1.52.1.
cdc7bbd5
XL
674
675Internal Only
676-------------
677These changes provide no direct user facing benefits, but represent significant
678improvements to the internals and overall performance of rustc and
679related tools.
680
681- [Rework the `std::sys::windows::alloc` implementation.][83065]
682- [rustdoc: Don't enter an infer_ctxt in get_blanket_impls for impls that aren't blanket impls.][82864]
683- [rustdoc: Only look at blanket impls in `get_blanket_impls`][83681]
684- [Rework rustdoc const type][82873]
685
17df50a5 686[85667]: https://github.com/rust-lang/rust/pull/85667
cdc7bbd5
XL
687[83386]: https://github.com/rust-lang/rust/pull/83386
688[82771]: https://github.com/rust-lang/rust/pull/82771
689[84147]: https://github.com/rust-lang/rust/pull/84147
690[84082]: https://github.com/rust-lang/rust/pull/84082
691[83799]: https://github.com/rust-lang/rust/pull/83799
692[83681]: https://github.com/rust-lang/rust/pull/83681
693[83652]: https://github.com/rust-lang/rust/pull/83652
694[83387]: https://github.com/rust-lang/rust/pull/83387
695[82873]: https://github.com/rust-lang/rust/pull/82873
696[82864]: https://github.com/rust-lang/rust/pull/82864
697[82608]: https://github.com/rust-lang/rust/pull/82608
698[82565]: https://github.com/rust-lang/rust/pull/82565
699[80525]: https://github.com/rust-lang/rust/pull/80525
700[79278]: https://github.com/rust-lang/rust/pull/79278
701[78618]: https://github.com/rust-lang/rust/pull/78618
702[77704]: https://github.com/rust-lang/rust/pull/77704
703[83941]: https://github.com/rust-lang/rust/pull/83941
704[83065]: https://github.com/rust-lang/rust/pull/83065
705[81764]: https://github.com/rust-lang/rust/pull/81764
706[81469]: https://github.com/rust-lang/rust/pull/81469
707[cargo/9298]: https://github.com/rust-lang/cargo/pull/9298
708[cargo/9282]: https://github.com/rust-lang/cargo/pull/9282
709[cargo/9392]: https://github.com/rust-lang/cargo/pull/9392
cdc7bbd5
XL
710[`AtomicBool::fetch_update`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicBool.html#method.fetch_update
711[`AtomicPtr::fetch_update`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicPtr.html#method.fetch_update
712[`BTreeMap::retain`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.retain
713[`BTreeSet::retain`]: https://doc.rust-lang.org/std/collections/struct.BTreeSet.html#method.retain
714[`BufReader::seek_relative`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.seek_relative
715[`DebugStruct::non_exhaustive`]: https://doc.rust-lang.org/std/fmt/struct.DebugStruct.html#method.finish_non_exhaustive
716[`Duration::MAX`]: https://doc.rust-lang.org/std/time/struct.Duration.html#associatedconstant.MAX
717[`Duration::ZERO`]: https://doc.rust-lang.org/std/time/struct.Duration.html#associatedconstant.ZERO
718[`Duration::is_zero`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.is_zero
719[`Duration::saturating_add`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_add
720[`Duration::saturating_mul`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_mul
721[`Duration::saturating_sub`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.saturating_sub
722[`ErrorKind::Unsupported`]: https://doc.rust-lang.org/std/io/enum.ErrorKind.html#variant.Unsupported
723[`Option::insert`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.insert
724[`Ordering::is_eq`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_eq
725[`Ordering::is_ge`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_ge
726[`Ordering::is_gt`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_gt
727[`Ordering::is_le`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_le
728[`Ordering::is_lt`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_lt
729[`Ordering::is_ne`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.is_ne
730[`OsStr::eq_ignore_ascii_case`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.eq_ignore_ascii_case
731[`OsStr::is_ascii`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.is_ascii
732[`OsStr::make_ascii_lowercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.make_ascii_lowercase
733[`OsStr::make_ascii_uppercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.make_ascii_uppercase
734[`OsStr::to_ascii_lowercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.to_ascii_lowercase
735[`OsStr::to_ascii_uppercase`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.to_ascii_uppercase
736[`Peekable::peek_mut`]: https://doc.rust-lang.org/std/iter/struct.Peekable.html#method.peek_mut
737[`Rc::decrement_strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.increment_strong_count
738[`Rc::increment_strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.increment_strong_count
739[`Vec::extend_from_within`]: https://doc.rust-lang.org/beta/std/vec/struct.Vec.html#method.extend_from_within
740[`array::from_mut`]: https://doc.rust-lang.org/beta/std/array/fn.from_mut.html
741[`array::from_ref`]: https://doc.rust-lang.org/beta/std/array/fn.from_ref.html
742[`cmp::max_by_key`]: https://doc.rust-lang.org/beta/std/cmp/fn.max_by_key.html
743[`cmp::max_by`]: https://doc.rust-lang.org/beta/std/cmp/fn.max_by.html
744[`cmp::min_by_key`]: https://doc.rust-lang.org/beta/std/cmp/fn.min_by_key.html
745[`cmp::min_by`]: https://doc.rust-lang.org/beta/std/cmp/fn.min_by.html
746[`f32::is_subnormal`]: https://doc.rust-lang.org/std/primitive.f64.html#method.is_subnormal
747[`f64::is_subnormal`]: https://doc.rust-lang.org/std/primitive.f64.html#method.is_subnormal
748[ietf6943]: https://datatracker.ietf.org/doc/html/rfc6943#section-3.1.1
749
750
f20569fa
XL
751Version 1.52.1 (2021-05-10)
752============================
753
754This release disables incremental compilation, unless the user has explicitly
755opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable.
756
757This is due to the widespread, and frequently occuring, breakage encountered by
758Rust users due to newly enabled incremental verification in 1.52.0. Notably,
759Rust users **should** upgrade to 1.52.0 or 1.52.1: the bugs that are detected by
760newly added incremental verification are still present in past stable versions,
761and are not yet fixed on any channel. These bugs can lead to miscompilation of
762Rust binaries.
763
764These problems only affect incremental builds, so release builds with Cargo
765should not be affected unless the user has explicitly opted into incremental.
766Debug and check builds are affected.
767
768See [84970] for more details.
769
770[84970]: https://github.com/rust-lang/rust/issues/84970
771
36d6ef2b
XL
772Version 1.52.0 (2021-05-06)
773============================
774
775Language
776--------
777- [Added the `unsafe_op_in_unsafe_fn` lint, which checks whether the unsafe code
778 in an `unsafe fn` is wrapped in a `unsafe` block.][79208] This lint
779 is allowed by default, and may become a warning or hard error in a
780 future edition.
781- [You can now cast mutable references to arrays to a pointer of the same type as
782 the element.][81479]
783
784Compiler
785--------
786- [Upgraded the default LLVM to LLVM 12.][81451]
787
788Added tier 3\* support for the following targets.
789
790- [`s390x-unknown-linux-musl`][82166]
791- [`riscv32gc-unknown-linux-musl` & `riscv64gc-unknown-linux-musl`][82202]
792- [`powerpc-unknown-openbsd`][82733]
793
794\* Refer to Rust's [platform support page][platform-support-doc] for more
795information on Rust's tiered platform support.
796
797Libraries
798---------
799- [`OsString` now implements `Extend` and `FromIterator`.][82121]
800- [`cmp::Reverse` now has `#[repr(transparent)]` representation.][81879]
801- [`Arc<impl Error>` now implements `error::Error`.][80553]
802- [All integer division and remainder operations are now `const`.][80962]
803
804Stabilised APIs
805-------------
806- [`Arguments::as_str`]
807- [`char::MAX`]
808- [`char::REPLACEMENT_CHARACTER`]
809- [`char::UNICODE_VERSION`]
810- [`char::decode_utf16`]
811- [`char::from_digit`]
812- [`char::from_u32_unchecked`]
813- [`char::from_u32`]
814- [`slice::partition_point`]
815- [`str::rsplit_once`]
816- [`str::split_once`]
817
818The following previously stable APIs are now `const`.
819
820- [`char::len_utf8`]
821- [`char::len_utf16`]
822- [`char::to_ascii_uppercase`]
823- [`char::to_ascii_lowercase`]
824- [`char::eq_ignore_ascii_case`]
825- [`u8::to_ascii_uppercase`]
826- [`u8::to_ascii_lowercase`]
827- [`u8::eq_ignore_ascii_case`]
828
829Rustdoc
830-------
831- [Rustdoc lints are now treated as a tool lint, meaning that
cdc7bbd5 832 lints are now prefixed with `rustdoc::` (e.g. `#[warn(rustdoc::broken_intra_doc_links)]`).][80527]
36d6ef2b
XL
833 Using the old style is still allowed, and will become a warning in
834 a future release.
835- [Rustdoc now supports argument files.][82261]
836- [Rustdoc now generates smart punctuation for documentation.][79423]
837- [You can now use "task lists" in Rustdoc Markdown.][81766] E.g.
838 ```markdown
839 - [x] Complete
840 - [ ] Todo
841 ```
842
843Misc
844----
845- [You can now pass multiple filters to tests.][81356] E.g.
846 `cargo test -- foo bar` will run all tests that match `foo` and `bar`.
847- [Rustup now distributes PDB symbols for the `std` library on Windows,
848 allowing you to see `std` symbols when debugging.][82218]
849
850Internal Only
851-------------
852These changes provide no direct user facing benefits, but represent significant
853improvements to the internals and overall performance of rustc and
854related tools.
855
856- [Check the result cache before the DepGraph when ensuring queries][81855]
857- [Try fast_reject::simplify_type in coherence before doing full check][81744]
858- [Only store a LocalDefId in some HIR nodes][81611]
859- [Store HIR attributes in a side table][79519]
860
861Compatibility Notes
862-------------------
863- [Cargo build scripts are now forbidden from setting `RUSTC_BOOTSTRAP`.][cargo/9181]
864- [Removed support for the `x86_64-rumprun-netbsd` target.][82594]
865- [Deprecated the `x86_64-sun-solaris` target in favor of `x86_64-pc-solaris`.][82216]
866- [Rustdoc now only accepts `,`, ` `, and `\t` as delimiters for specifying
867 languages in code blocks.][78429]
868- [Rustc now catches more cases of `pub_use_of_private_extern_crate`][80763]
869- [Changes in how proc macros handle whitespace may lead to panics when used
870 with older `proc-macro-hack` versions. A `cargo update` should be sufficient to fix this in all cases.][84136]
17df50a5 871- [Turn `#[derive]` into a regular macro attribute][79078]
36d6ef2b
XL
872
873[84136]: https://github.com/rust-lang/rust/issues/84136
874[80763]: https://github.com/rust-lang/rust/pull/80763
875[82166]: https://github.com/rust-lang/rust/pull/82166
876[82121]: https://github.com/rust-lang/rust/pull/82121
877[81879]: https://github.com/rust-lang/rust/pull/81879
878[82261]: https://github.com/rust-lang/rust/pull/82261
879[82218]: https://github.com/rust-lang/rust/pull/82218
880[82216]: https://github.com/rust-lang/rust/pull/82216
881[82202]: https://github.com/rust-lang/rust/pull/82202
882[81855]: https://github.com/rust-lang/rust/pull/81855
883[81766]: https://github.com/rust-lang/rust/pull/81766
884[81744]: https://github.com/rust-lang/rust/pull/81744
885[81611]: https://github.com/rust-lang/rust/pull/81611
886[81479]: https://github.com/rust-lang/rust/pull/81479
887[81451]: https://github.com/rust-lang/rust/pull/81451
888[81356]: https://github.com/rust-lang/rust/pull/81356
889[80962]: https://github.com/rust-lang/rust/pull/80962
890[80553]: https://github.com/rust-lang/rust/pull/80553
891[80527]: https://github.com/rust-lang/rust/pull/80527
892[79519]: https://github.com/rust-lang/rust/pull/79519
893[79423]: https://github.com/rust-lang/rust/pull/79423
894[79208]: https://github.com/rust-lang/rust/pull/79208
895[78429]: https://github.com/rust-lang/rust/pull/78429
896[82733]: https://github.com/rust-lang/rust/pull/82733
897[82594]: https://github.com/rust-lang/rust/pull/82594
17df50a5 898[79078]: https://github.com/rust-lang/rust/pull/79078
36d6ef2b
XL
899[cargo/9181]: https://github.com/rust-lang/cargo/pull/9181
900[`char::MAX`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.MAX
901[`char::REPLACEMENT_CHARACTER`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.REPLACEMENT_CHARACTER
902[`char::UNICODE_VERSION`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.UNICODE_VERSION
903[`char::decode_utf16`]: https://doc.rust-lang.org/std/primitive.char.html#method.decode_utf16
904[`char::from_u32`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32
905[`char::from_u32_unchecked`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32_unchecked
906[`char::from_digit`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_digit
907[`Peekable::next_if`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if
908[`Peekable::next_if_eq`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if_eq
909[`Arguments::as_str`]: https://doc.rust-lang.org/stable/std/fmt/struct.Arguments.html#method.as_str
910[`str::split_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_once
911[`str::rsplit_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.rsplit_once
912[`slice::partition_point`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.partition_point
913[`char::len_utf8`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf8
914[`char::len_utf16`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf16
915[`char::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_uppercase
916[`char::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_lowercase
917[`char::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.eq_ignore_ascii_case
918[`u8::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_uppercase
919[`u8::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_lowercase
920[`u8::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.eq_ignore_ascii_case
921
922Version 1.51.0 (2021-03-25)
923============================
924
925Language
926--------
927- [You can now parameterize items such as functions, traits, and `struct`s by constant
928 values in addition to by types and lifetimes.][79135] Also known as "const generics"
929 E.g. you can now write the following. Note: Only values of primitive integers,
930 `bool`, or `char` types are currently permitted.
931 ```rust
932 struct GenericArray<T, const LENGTH: usize> {
933 inner: [T; LENGTH]
934 }
935
936 impl<T, const LENGTH: usize> GenericArray<T, LENGTH> {
937 const fn last(&self) -> Option<&T> {
938 if LENGTH == 0 {
939 None
940 } else {
941 Some(&self.inner[LENGTH - 1])
942 }
943 }
944 }
945 ```
946
947
948Compiler
949--------
950
951- [Added the `-Csplit-debuginfo` codegen option for macOS platforms.][79570]
952 This option controls whether debug information is split across multiple files
953 or packed into a single file. **Note** This option is unstable on other platforms.
954- [Added tier 3\* support for `aarch64_be-unknown-linux-gnu`,
955 `aarch64-unknown-linux-gnu_ilp32`, and `aarch64_be-unknown-linux-gnu_ilp32` targets.][81455]
956- [Added tier 3 support for `i386-unknown-linux-gnu` and `i486-unknown-linux-gnu` targets.][80662]
957- [The `target-cpu=native` option will now detect individual features of CPUs.][80749]
958
959\* Refer to Rust's [platform support page][platform-support-doc] for more
960information on Rust's tiered platform support.
961
962Libraries
963---------
964
965- [`Box::downcast` is now also implemented for any `dyn Any + Send + Sync` object.][80945]
966- [`str` now implements `AsMut<str>`.][80279]
967- [`u64` and `u128` now implement `From<char>`.][79502]
968- [`Error` is now implemented for `&T` where `T` implements `Error`.][75180]
969- [`Poll::{map_ok, map_err}` are now implemented for `Poll<Option<Result<T, E>>>`.][80968]
970- [`unsigned_abs` is now implemented for all signed integer types.][80959]
971- [`io::Empty` now implements `io::Seek`.][78044]
972- [`rc::Weak<T>` and `sync::Weak<T>`'s methods such as `as_ptr` are now implemented for
973 `T: ?Sized` types.][80764]
974- [`Div` and `Rem` by their `NonZero` variant is now implemented for all unsigned integers.][79134]
975
976
977Stabilized APIs
978---------------
979
980- [`Arc::decrement_strong_count`]
981- [`Arc::increment_strong_count`]
982- [`Once::call_once_force`]
983- [`Peekable::next_if_eq`]
984- [`Peekable::next_if`]
985- [`Seek::stream_position`]
986- [`array::IntoIter`]
987- [`panic::panic_any`]
988- [`ptr::addr_of!`]
989- [`ptr::addr_of_mut!`]
990- [`slice::fill_with`]
991- [`slice::split_inclusive_mut`]
992- [`slice::split_inclusive`]
993- [`slice::strip_prefix`]
994- [`slice::strip_suffix`]
995- [`str::split_inclusive`]
996- [`sync::OnceState`]
997- [`task::Wake`]
998- [`VecDeque::range`]
999- [`VecDeque::range_mut`]
1000
1001Cargo
1002-----
1003- [Added the `split-debuginfo` profile option to control the -Csplit-debuginfo
1004 codegen option.][cargo/9112]
1005- [Added the `resolver` field to `Cargo.toml` to enable the new feature resolver
1006 and CLI option behavior.][cargo/8997] Version 2 of the feature resolver will try
1007 to avoid unifying features of dependencies where that unification could be unwanted.
1008 Such as using the same dependency with a `std` feature in a build scripts and
1009 proc-macros, while using the `no-std` feature in the final binary. See the
1010 [Cargo book documentation][feature-resolver@2.0] for more information on the feature.
1011
1012Rustdoc
1013-------
1014
1015- [Rustdoc will now include documentation for methods available from _nested_ `Deref` traits.][80653]
1016- [You can now provide a `--default-theme` flag which sets the default theme to use for
1017 documentation.][79642]
1018
1019Various improvements to intra-doc links:
1020
1021- [You can link to non-path primitives such as `slice`.][80181]
1022- [You can link to associated items.][74489]
1023- [You can now include generic parameters when linking to items, like `Vec<T>`.][76934]
1024
1025Misc
1026----
1027- [You can now pass `--include-ignored` to tests (e.g. with
1028 `cargo test -- --include-ignored`) to include testing tests marked `#[ignore]`.][80053]
1029
1030Compatibility Notes
1031-------------------
1032
1033- [WASI platforms no longer use the `wasm-bindgen` ABI, and instead use the wasm32 ABI.][79998]
1034- [`rustc` no longer promotes division, modulo and indexing operations to `const` that
1035 could fail.][80579]
1036- [The minimum version of glibc for the following platforms has been bumped to version 2.31
1037 for the distributed artifacts.][81521]
1038 - `armv5te-unknown-linux-gnueabi`
1039 - `sparc64-unknown-linux-gnu`
1040 - `thumbv7neon-unknown-linux-gnueabihf`
1041 - `armv7-unknown-linux-gnueabi`
1042 - `x86_64-unknown-linux-gnux32`
1043- [`atomic::spin_loop_hint` has been deprecated.][80966] It's recommended to use `hint::spin_loop` instead.
1044
1045Internal Only
1046-------------
1047
1048- [Consistently avoid constructing optimized MIR when not doing codegen][80718]
1049
1050[79135]: https://github.com/rust-lang/rust/pull/79135
1051[74489]: https://github.com/rust-lang/rust/pull/74489
1052[76934]: https://github.com/rust-lang/rust/pull/76934
1053[79570]: https://github.com/rust-lang/rust/pull/79570
1054[80181]: https://github.com/rust-lang/rust/pull/80181
1055[79642]: https://github.com/rust-lang/rust/pull/79642
1056[80945]: https://github.com/rust-lang/rust/pull/80945
1057[80279]: https://github.com/rust-lang/rust/pull/80279
1058[80053]: https://github.com/rust-lang/rust/pull/80053
1059[79502]: https://github.com/rust-lang/rust/pull/79502
1060[75180]: https://github.com/rust-lang/rust/pull/75180
1061[79135]: https://github.com/rust-lang/rust/pull/79135
1062[81521]: https://github.com/rust-lang/rust/pull/81521
1063[80968]: https://github.com/rust-lang/rust/pull/80968
1064[80959]: https://github.com/rust-lang/rust/pull/80959
1065[80718]: https://github.com/rust-lang/rust/pull/80718
1066[80653]: https://github.com/rust-lang/rust/pull/80653
1067[80579]: https://github.com/rust-lang/rust/pull/80579
1068[79998]: https://github.com/rust-lang/rust/pull/79998
1069[78044]: https://github.com/rust-lang/rust/pull/78044
1070[81455]: https://github.com/rust-lang/rust/pull/81455
1071[80764]: https://github.com/rust-lang/rust/pull/80764
1072[80749]: https://github.com/rust-lang/rust/pull/80749
1073[80662]: https://github.com/rust-lang/rust/pull/80662
1074[79134]: https://github.com/rust-lang/rust/pull/79134
1075[80966]: https://github.com/rust-lang/rust/pull/80966
1076[cargo/8997]: https://github.com/rust-lang/cargo/pull/8997
1077[cargo/9112]: https://github.com/rust-lang/cargo/pull/9112
1078[feature-resolver@2.0]: https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2
1079[`Once::call_once_force`]: https://doc.rust-lang.org/stable/std/sync/struct.Once.html#method.call_once_force
1080[`sync::OnceState`]: https://doc.rust-lang.org/stable/std/sync/struct.OnceState.html
1081[`panic::panic_any`]: https://doc.rust-lang.org/stable/std/panic/fn.panic_any.html
1082[`slice::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_prefix
1083[`slice::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.strip_prefix
1084[`Arc::increment_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.increment_strong_count
1085[`Arc::decrement_strong_count`]: https://doc.rust-lang.org/nightly/std/sync/struct.Arc.html#method.decrement_strong_count
1086[`slice::fill_with`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.fill_with
1087[`ptr::addr_of!`]: https://doc.rust-lang.org/nightly/std/ptr/macro.addr_of.html
1088[`ptr::addr_of_mut!`]: https://doc.rust-lang.org/nightly/std/ptr/macro.addr_of_mut.html
1089[`array::IntoIter`]: https://doc.rust-lang.org/nightly/std/array/struct.IntoIter.html
1090[`slice::split_inclusive`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_inclusive
1091[`slice::split_inclusive_mut`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_inclusive_mut
1092[`str::split_inclusive`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_inclusive
1093[`task::Wake`]: https://doc.rust-lang.org/nightly/std/task/trait.Wake.html
1094[`Seek::stream_position`]: https://doc.rust-lang.org/nightly/std/io/trait.Seek.html#method.stream_position
1095[`Peekable::next_if`]: https://doc.rust-lang.org/nightly/std/iter/struct.Peekable.html#method.next_if
1096[`Peekable::next_if_eq`]: https://doc.rust-lang.org/nightly/std/iter/struct.Peekable.html#method.next_if_eq
1097[`VecDeque::range`]: https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.range
1098[`VecDeque::range_mut`]: https://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.range_mut
1099
fc512014
XL
1100Version 1.50.0 (2021-02-11)
1101============================
1102
1103Language
1104-----------------------
1105- [You can now use `const` values for `x` in `[x; N]` array expressions.][79270]
1106 This has been technically possible since 1.38.0, as it was unintentionally stabilized.
1107- [Assignments to `ManuallyDrop<T>` union fields are now considered safe.][78068]
1108
1109Compiler
1110-----------------------
1111- [Added tier 3\* support for the `armv5te-unknown-linux-uclibceabi` target.][78142]
1112- [Added tier 3 support for the `aarch64-apple-ios-macabi` target.][77484]
1113- [The `x86_64-unknown-freebsd` is now built with the full toolset.][79484]
6a06907d 1114- [Dropped support for all cloudabi targets.][78439]
fc512014 1115
36d6ef2b 1116\* Refer to Rust's [platform support page][platform-support-doc] for more
fc512014
XL
1117information on Rust's tiered platform support.
1118
1119Libraries
1120-----------------------
1121
1122- [`proc_macro::Punct` now implements `PartialEq<char>`.][78636]
1123- [`ops::{Index, IndexMut}` are now implemented for fixed sized arrays of any length.][74989]
1124- [On Unix platforms, the `std::fs::File` type now has a "niche" of `-1`.][74699]
1125 This value cannot be a valid file descriptor, and now means `Option<File>` takes
1126 up the same amount of space as `File`.
1127
1128Stabilized APIs
1129---------------
1130
1131- [`bool::then`]
1132- [`btree_map::Entry::or_insert_with_key`]
1133- [`f32::clamp`]
1134- [`f64::clamp`]
1135- [`hash_map::Entry::or_insert_with_key`]
1136- [`Ord::clamp`]
1137- [`RefCell::take`]
1138- [`slice::fill`]
1139- [`UnsafeCell::get_mut`]
1140
1141The following previously stable methods are now `const`.
1142
1143- [`IpAddr::is_ipv4`]
1144- [`IpAddr::is_ipv6`]
6a06907d
XL
1145- [`IpAddr::is_unspecified`]
1146- [`IpAddr::is_loopback`]
1147- [`IpAddr::is_multicast`]
1148- [`Ipv4Addr::octets`]
1149- [`Ipv4Addr::is_loopback`]
1150- [`Ipv4Addr::is_private`]
1151- [`Ipv4Addr::is_link_local`]
1152- [`Ipv4Addr::is_multicast`]
1153- [`Ipv4Addr::is_broadcast`]
1154- [`Ipv4Addr::is_documentation`]
1155- [`Ipv4Addr::to_ipv6_compatible`]
1156- [`Ipv4Addr::to_ipv6_mapped`]
1157- [`Ipv6Addr::segments`]
1158- [`Ipv6Addr::is_unspecified`]
1159- [`Ipv6Addr::is_loopback`]
1160- [`Ipv6Addr::is_multicast`]
1161- [`Ipv6Addr::to_ipv4`]
fc512014
XL
1162- [`Layout::size`]
1163- [`Layout::align`]
1164- [`Layout::from_size_align`]
1165- `pow` for all integer types.
1166- `checked_pow` for all integer types.
1167- `saturating_pow` for all integer types.
1168- `wrapping_pow` for all integer types.
1169- `next_power_of_two` for all unsigned integer types.
6a06907d 1170- `checked_next_power_of_two` for all unsigned integer types.
fc512014
XL
1171
1172Cargo
1173-----------------------
1174
1175- [Added the `[build.rustc-workspace-wrapper]` option.][cargo/8976]
1176 This option sets a wrapper to execute instead of `rustc`, for workspace members only.
1177- [`cargo:rerun-if-changed` will now, if provided a directory, scan the entire
1178 contents of that directory for changes.][cargo/8973]
1179- [Added the `--workspace` flag to the `cargo update` command.][cargo/8725]
1180
1181Misc
1182----
1183
1184- [The search results tab and the help button are focusable with keyboard in rustdoc.][79896]
1185- [Running tests will now print the total time taken to execute.][75752]
1186
1187Compatibility Notes
1188-------------------
1189
1190- [The `compare_and_swap` method on atomics has been deprecated.][79261] It's
1191 recommended to use the `compare_exchange` and `compare_exchange_weak` methods instead.
1192- [Changes in how `TokenStream`s are checked have fixed some cases where you could write
1193 unhygenic `macro_rules!` macros.][79472]
1194- [`#![test]` as an inner attribute is now considered unstable like other inner macro
1195 attributes, and reports an error by default through the `soft_unstable` lint.][79003]
1196- [Overriding a `forbid` lint at the same level that it was set is now a hard error.][78864]
fc512014
XL
1197- [You can no longer intercept `panic!` calls by supplying your own macro.][78343] It's
1198 recommended to use the `#[panic_handler]` attribute to provide your own implementation.
1199- [Semi-colons after item statements (e.g. `struct Foo {};`) now produce a warning.][78296]
1200
1201[74989]: https://github.com/rust-lang/rust/pull/74989
1202[79261]: https://github.com/rust-lang/rust/pull/79261
1203[79896]: https://github.com/rust-lang/rust/pull/79896
1204[79484]: https://github.com/rust-lang/rust/pull/79484
1205[79472]: https://github.com/rust-lang/rust/pull/79472
1206[79270]: https://github.com/rust-lang/rust/pull/79270
1207[79003]: https://github.com/rust-lang/rust/pull/79003
1208[78864]: https://github.com/rust-lang/rust/pull/78864
1209[78636]: https://github.com/rust-lang/rust/pull/78636
1210[78439]: https://github.com/rust-lang/rust/pull/78439
1211[78343]: https://github.com/rust-lang/rust/pull/78343
1212[78296]: https://github.com/rust-lang/rust/pull/78296
1213[78068]: https://github.com/rust-lang/rust/pull/78068
1214[75752]: https://github.com/rust-lang/rust/pull/75752
1215[74699]: https://github.com/rust-lang/rust/pull/74699
1216[78142]: https://github.com/rust-lang/rust/pull/78142
1217[77484]: https://github.com/rust-lang/rust/pull/77484
1218[cargo/8976]: https://github.com/rust-lang/cargo/pull/8976
1219[cargo/8973]: https://github.com/rust-lang/cargo/pull/8973
1220[cargo/8725]: https://github.com/rust-lang/cargo/pull/8725
1221[`IpAddr::is_ipv4`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv4
1222[`IpAddr::is_ipv6`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_ipv6
6a06907d
XL
1223[`IpAddr::is_unspecified`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_unspecified
1224[`IpAddr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_loopback
1225[`IpAddr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/enum.IpAddr.html#method.is_multicast
1226[`Ipv4Addr::octets`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.octets
1227[`Ipv4Addr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_loopback
1228[`Ipv4Addr::is_private`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_private
1229[`Ipv4Addr::is_link_local`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_link_local
1230[`Ipv4Addr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_multicast
1231[`Ipv4Addr::is_broadcast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_broadcast
1232[`Ipv4Addr::is_documentation`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.is_documentation
1233[`Ipv4Addr::to_ipv6_compatible`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.to_ipv6_compatible
1234[`Ipv4Addr::to_ipv6_mapped`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv4Addr.html#method.to_ipv6_mapped
1235[`Ipv6Addr::segments`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.segments
1236[`Ipv6Addr::is_unspecified`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_unspecified
1237[`Ipv6Addr::is_loopback`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_loopback
1238[`Ipv6Addr::is_multicast`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.is_multicast
1239[`Ipv6Addr::to_ipv4`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.to_ipv4
fc512014
XL
1240[`Layout::align`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.align
1241[`Layout::from_size_align`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.from_size_align
1242[`Layout::size`]: https://doc.rust-lang.org/stable/std/alloc/struct.Layout.html#method.size
1243[`Ord::clamp`]: https://doc.rust-lang.org/stable/std/cmp/trait.Ord.html#method.clamp
1244[`RefCell::take`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.take
1245[`UnsafeCell::get_mut`]: https://doc.rust-lang.org/stable/std/cell/struct.UnsafeCell.html#method.get_mut
1246[`bool::then`]: https://doc.rust-lang.org/stable/std/primitive.bool.html#method.then
1247[`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
1248[`f32::clamp`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.clamp
1249[`f64::clamp`]: https://doc.rust-lang.org/stable/std/primitive.f64.html#method.clamp
1250[`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
1251[`slice::fill`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.fill
1252
1253
b9856134
XL
1254Version 1.49.0 (2020-12-31)
1255============================
1256
1257Language
1258-----------------------
1259
1260- [Unions can now implement `Drop`, and you can now have a field in a union
1261 with `ManuallyDrop<T>`.][77547]
1262- [You can now cast uninhabited enums to integers.][76199]
1263- [You can now bind by reference and by move in patterns.][76119] This
1264 allows you to selectively borrow individual components of a type. E.g.
1265 ```rust
1266 #[derive(Debug)]
1267 struct Person {
1268 name: String,
1269 age: u8,
1270 }
1271
1272 let person = Person {
1273 name: String::from("Alice"),
1274 age: 20,
1275 };
1276
1277 // `name` is moved out of person, but `age` is referenced.
1278 let Person { name, ref age } = person;
1279 println!("{} {}", name, age);
1280 ```
1281
1282Compiler
1283-----------------------
1284
1285- [Added tier 1\* support for `aarch64-unknown-linux-gnu`.][78228]
1286- [Added tier 2 support for `aarch64-apple-darwin`.][75991]
1287- [Added tier 2 support for `aarch64-pc-windows-msvc`.][75914]
1288- [Added tier 3 support for `mipsel-unknown-none`.][78676]
1289- [Raised the minimum supported LLVM version to LLVM 9.][78848]
1290- [Output from threads spawned in tests is now captured.][78227]
1291- [Change os and vendor values to "none" and "unknown" for some targets][78951]
1292
36d6ef2b 1293\* Refer to Rust's [platform support page][platform-support-doc] for more
b9856134
XL
1294information on Rust's tiered platform support.
1295
1296Libraries
1297-----------------------
1298
1299- [`RangeInclusive` now checks for exhaustion when calling `contains` and indexing.][78109]
1300- [`ToString::to_string` now no longer shrinks the internal buffer in the default implementation.][77997]
b9856134
XL
1301
1302Stabilized APIs
1303---------------
1304
1305- [`slice::select_nth_unstable`]
1306- [`slice::select_nth_unstable_by`]
1307- [`slice::select_nth_unstable_by_key`]
1308
1309The following previously stable methods are now `const`.
1310
1311- [`Poll::is_ready`]
1312- [`Poll::is_pending`]
1313
1314Cargo
1315-----------------------
1316- [Building a crate with `cargo-package` should now be independently reproducible.][cargo/8864]
1317- [`cargo-tree` now marks proc-macro crates.][cargo/8765]
1318- [Added `CARGO_PRIMARY_PACKAGE` build-time environment variable.][cargo/8758] This
1319 variable will be set if the crate being built is one the user selected to build, either
1320 with `-p` or through defaults.
1321- [You can now use glob patterns when specifying packages & targets.][cargo/8752]
1322
1323
1324Compatibility Notes
1325-------------------
1326
1327- [Demoted `i686-unknown-freebsd` from host tier 2 to target tier 2 support.][78746]
1328- [Macros that end with a semi-colon are now treated as statements even if they expand to nothing.][78376]
1329- [Rustc will now check for the validity of some built-in attributes on enum variants.][77015]
1330 Previously such invalid or unused attributes could be ignored.
1331- Leading whitespace is stripped more uniformly in documentation comments, which may change behavior. You
1332 read [this post about the changes][rustdoc-ws-post] for more details.
1333- [Trait bounds are no longer inferred for associated types.][79904]
1334
1335Internal Only
1336-------------
1337These changes provide no direct user facing benefits, but represent significant
1338improvements to the internals and overall performance of rustc and
1339related tools.
1340
1341- [rustc's internal crates are now compiled using the `initial-exec` Thread
1342 Local Storage model.][78201]
1343- [Calculate visibilities once in resolve.][78077]
1344- [Added `system` to the `llvm-libunwind` bootstrap config option.][77703]
1345- [Added `--color` for configuring terminal color support to bootstrap.][79004]
1346
1347
1348[75991]: https://github.com/rust-lang/rust/pull/75991
1349[78951]: https://github.com/rust-lang/rust/pull/78951
1350[78848]: https://github.com/rust-lang/rust/pull/78848
1351[78746]: https://github.com/rust-lang/rust/pull/78746
1352[78376]: https://github.com/rust-lang/rust/pull/78376
1353[78228]: https://github.com/rust-lang/rust/pull/78228
1354[78227]: https://github.com/rust-lang/rust/pull/78227
1355[78201]: https://github.com/rust-lang/rust/pull/78201
1356[78109]: https://github.com/rust-lang/rust/pull/78109
1357[78077]: https://github.com/rust-lang/rust/pull/78077
1358[77997]: https://github.com/rust-lang/rust/pull/77997
1359[77703]: https://github.com/rust-lang/rust/pull/77703
1360[77547]: https://github.com/rust-lang/rust/pull/77547
1361[77015]: https://github.com/rust-lang/rust/pull/77015
1362[76199]: https://github.com/rust-lang/rust/pull/76199
1363[76119]: https://github.com/rust-lang/rust/pull/76119
1364[75914]: https://github.com/rust-lang/rust/pull/75914
b9856134
XL
1365[79004]: https://github.com/rust-lang/rust/pull/79004
1366[78676]: https://github.com/rust-lang/rust/pull/78676
1367[79904]: https://github.com/rust-lang/rust/issues/79904
1368[cargo/8864]: https://github.com/rust-lang/cargo/pull/8864
1369[cargo/8765]: https://github.com/rust-lang/cargo/pull/8765
1370[cargo/8758]: https://github.com/rust-lang/cargo/pull/8758
1371[cargo/8752]: https://github.com/rust-lang/cargo/pull/8752
1372[`slice::select_nth_unstable`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable
1373[`slice::select_nth_unstable_by`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by
1374[`slice::select_nth_unstable_by_key`]: https://doc.rust-lang.org/nightly/std/primitive.slice.html#method.select_nth_unstable_by_key
1375[`hint::spin_loop`]: https://doc.rust-lang.org/stable/std/hint/fn.spin_loop.html
1376[`Poll::is_ready`]: https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_ready
1377[`Poll::is_pending`]: https://doc.rust-lang.org/stable/std/task/enum.Poll.html#method.is_pending
1378[rustdoc-ws-post]: https://blog.guillaume-gomez.fr/articles/2020-11-11+New+doc+comment+handling+in+rustdoc
1379
2a314972
XL
1380Version 1.48.0 (2020-11-19)
1381==========================
1382
1383Language
1384--------
1385
1386- [The `unsafe` keyword is now syntactically permitted on modules.][75857] This
1387 is still rejected *semantically*, but can now be parsed by procedural macros.
1388
1389Compiler
1390--------
1391- [Stabilised the `-C link-self-contained=<yes|no>` compiler flag.][76158] This tells
b9856134 1392 `rustc` whether to link its own C runtime and libraries or to rely on a external
2a314972
XL
1393 linker to find them. (Supported only on `windows-gnu`, `linux-musl`, and `wasi` platforms.)
1394- [You can now use `-C target-feature=+crt-static` on `linux-gnu` targets.][77386]
1395 Note: If you're using cargo you must explicitly pass the `--target` flag.
1396- [Added tier 2\* support for `aarch64-unknown-linux-musl`.][76420]
1397
36d6ef2b 1398\* Refer to Rust's [platform support page][platform-support-doc] for more
2a314972
XL
1399information on Rust's tiered platform support.
1400
1401Libraries
1402---------
1403- [`io::Write` is now implemented for `&ChildStdin` `&Sink`, `&Stdout`,
1404 and `&Stderr`.][76275]
1405- [All arrays of any length now implement `TryFrom<Vec<T>>`.][76310]
1406- [The `matches!` macro now supports having a trailing comma.][74880]
1407- [`Vec<A>` now implements `PartialEq<[B]>` where `A: PartialEq<B>`.][74194]
1408- [The `RefCell::{replace, replace_with, clone}` methods now all use `#[track_caller]`.][77055]
1409
1410Stabilized APIs
1411---------------
1412- [`slice::as_ptr_range`]
1413- [`slice::as_mut_ptr_range`]
1414- [`VecDeque::make_contiguous`]
1415- [`future::pending`]
1416- [`future::ready`]
1417
1418The following previously stable methods are now `const fn`'s:
1419
1420- [`Option::is_some`]
1421- [`Option::is_none`]
1422- [`Option::as_ref`]
1423- [`Result::is_ok`]
1424- [`Result::is_err`]
1425- [`Result::as_ref`]
1426- [`Ordering::reverse`]
1427- [`Ordering::then`]
1428
1429Cargo
1430-----
1431
1432Rustdoc
1433-------
1434- [You can now link to items in `rustdoc` using the intra-doc link
1435 syntax.][74430] E.g. ``/// Uses [`std::future`]`` will automatically generate
1436 a link to `std::future`'s documentation. See ["Linking to items by
1437 name"][intradoc-links] for more information.
1438- [You can now specify `#[doc(alias = "<alias>")]` on items to add search aliases
1439 when searching through `rustdoc`'s UI.][75740]
1440
1441Compatibility Notes
1442-------------------
1443- [Promotion of references to `'static` lifetime inside `const fn` now follows the
1444 same rules as inside a `fn` body.][75502] In particular, `&foo()` will not be
1445 promoted to `'static` lifetime any more inside `const fn`s.
1446- [Associated type bindings on trait objects are now verified to meet the bounds
1447 declared on the trait when checking that they implement the trait.][27675]
1448- [When trait bounds on associated types or opaque types are ambiguous, the
1449 compiler no longer makes an arbitrary choice on which bound to use.][54121]
1450- [Fixed recursive nonterminals not being expanded in macros during
1451 pretty-print/reparse check.][77153] This may cause errors if your macro wasn't
1452 correctly handling recursive nonterminal tokens.
1453- [`&mut` references to non zero-sized types are no longer promoted.][75585]
1454- [`rustc` will now warn if you use attributes like `#[link_name]` or `#[cold]`
1455 in places where they have no effect.][73461]
1456- [Updated `_mm256_extract_epi8` and `_mm256_extract_epi16` signatures in
1457 `arch::{x86, x86_64}` to return `i32` to match the vendor signatures.][73166]
1458- [`mem::uninitialized` will now panic if any inner types inside a struct or enum
1459 disallow zero-initialization.][71274]
1460- [`#[target_feature]` will now error if used in a place where it has no effect.][78143]
1461- [Foreign exceptions are now caught by `catch_unwind` and will cause an abort.][70212]
1462 Note: This behaviour is not guaranteed and is still considered undefined behaviour,
1463 see the [`catch_unwind`] documentation for further information.
b9856134 1464
2a314972
XL
1465
1466
1467Internal Only
1468-------------
1469These changes provide no direct user facing benefits, but represent significant
1470improvements to the internals and overall performance of rustc and
1471related tools.
1472
1473- [Building `rustc` from source now uses `ninja` by default over `make`.][74922]
1474 You can continue building with `make` by setting `ninja=false` in
1475 your `config.toml`.
1476- [cg_llvm: `fewer_names` in `uncached_llvm_type`][76030]
1477- [Made `ensure_sufficient_stack()` non-generic][76680]
1478
1479[78143]: https://github.com/rust-lang/rust/issues/78143
1480[76680]: https://github.com/rust-lang/rust/pull/76680/
1481[76030]: https://github.com/rust-lang/rust/pull/76030/
1482[70212]: https://github.com/rust-lang/rust/pull/70212/
1483[27675]: https://github.com/rust-lang/rust/issues/27675/
b9856134 1484[54121]: https://github.com/rust-lang/rust/issues/54121/
2a314972
XL
1485[71274]: https://github.com/rust-lang/rust/pull/71274/
1486[77386]: https://github.com/rust-lang/rust/pull/77386/
1487[77153]: https://github.com/rust-lang/rust/pull/77153/
1488[77055]: https://github.com/rust-lang/rust/pull/77055/
1489[76275]: https://github.com/rust-lang/rust/pull/76275/
1490[76310]: https://github.com/rust-lang/rust/pull/76310/
1491[76420]: https://github.com/rust-lang/rust/pull/76420/
1492[76158]: https://github.com/rust-lang/rust/pull/76158/
1493[75857]: https://github.com/rust-lang/rust/pull/75857/
1494[75585]: https://github.com/rust-lang/rust/pull/75585/
1495[75740]: https://github.com/rust-lang/rust/pull/75740/
1496[75502]: https://github.com/rust-lang/rust/pull/75502/
1497[74880]: https://github.com/rust-lang/rust/pull/74880/
1498[74922]: https://github.com/rust-lang/rust/pull/74922/
1499[74430]: https://github.com/rust-lang/rust/pull/74430/
1500[74194]: https://github.com/rust-lang/rust/pull/74194/
1501[73461]: https://github.com/rust-lang/rust/pull/73461/
1502[73166]: https://github.com/rust-lang/rust/pull/73166/
1503[intradoc-links]: https://doc.rust-lang.org/rustdoc/linking-to-items-by-name.html
1504[`catch_unwind`]: https://doc.rust-lang.org/std/panic/fn.catch_unwind.html
1505[`Option::is_some`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_some
1506[`Option::is_none`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.is_none
1507[`Option::as_ref`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_ref
1508[`Result::is_ok`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.is_ok
1509[`Result::is_err`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.is_err
1510[`Result::as_ref`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.as_ref
1511[`Ordering::reverse`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.reverse
1512[`Ordering::then`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then
1513[`slice::as_ptr_range`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr_range
1514[`slice::as_mut_ptr_range`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_mut_ptr_range
1515[`VecDeque::make_contiguous`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.make_contiguous
1516[`future::pending`]: https://doc.rust-lang.org/std/future/fn.pending.html
1517[`future::ready`]: https://doc.rust-lang.org/std/future/fn.ready.html
1518
1519
6c58768f
XL
1520Version 1.47.0 (2020-10-08)
1521==========================
1522
1523Language
1524--------
1525- [Closures will now warn when not used.][74869]
1526
1527Compiler
1528--------
1529- [Stabilized the `-C control-flow-guard` codegen option][73893], which enables
1530 [Control Flow Guard][1.47.0-cfg] for Windows platforms, and is ignored on other
1531 platforms.
1532- [Upgraded to LLVM 11.][73526]
1533- [Added tier 3\* support for the `thumbv4t-none-eabi` target.][74419]
1534- [Upgrade the FreeBSD toolchain to version 11.4][75204]
1535- [`RUST_BACKTRACE`'s output is now more compact.][75048]
1536
36d6ef2b 1537\* Refer to Rust's [platform support page][platform-support-doc] for more
6c58768f
XL
1538information on Rust's tiered platform support.
1539
1540Libraries
1541---------
1542- [`CStr` now implements `Index<RangeFrom<usize>>`.][74021]
1543- [Traits in `std`/`core` are now implemented for arrays of any length, not just
1544 those of length less than 33.][74060]
1545- [`ops::RangeFull` and `ops::Range` now implement Default.][73197]
1546- [`panic::Location` now implements `Copy`, `Clone`, `Eq`, `Hash`, `Ord`,
1547 `PartialEq`, and `PartialOrd`.][73583]
1548
1549Stabilized APIs
1550---------------
1551- [`Ident::new_raw`]
1552- [`Range::is_empty`]
1553- [`RangeInclusive::is_empty`]
1554- [`Result::as_deref`]
1555- [`Result::as_deref_mut`]
1556- [`Vec::leak`]
1557- [`pointer::offset_from`]
1558- [`f32::TAU`]
1559- [`f64::TAU`]
1560
1561The following previously stable APIs have now been made const.
1562
1563- [The `new` method for all `NonZero` integers.][73858]
1564- [The `checked_add`,`checked_sub`,`checked_mul`,`checked_neg`, `checked_shl`,
1565 `checked_shr`, `saturating_add`, `saturating_sub`, and `saturating_mul`
1566 methods for all integers.][73858]
1567- [The `checked_abs`, `saturating_abs`, `saturating_neg`, and `signum` for all
1568 signed integers.][73858]
1569- [The `is_ascii_alphabetic`, `is_ascii_uppercase`, `is_ascii_lowercase`,
1570 `is_ascii_alphanumeric`, `is_ascii_digit`, `is_ascii_hexdigit`,
1571 `is_ascii_punctuation`, `is_ascii_graphic`, `is_ascii_whitespace`, and
1572 `is_ascii_control` methods for `char` and `u8`.][73858]
1573
1574Cargo
1575-----
1576- [`build-dependencies` are now built with opt-level 0 by default.][cargo/8500]
1577 You can override this by setting the following in your `Cargo.toml`.
1578 ```toml
1579 [profile.release.build-override]
1580 opt-level = 3
1581 ```
1582- [`cargo-help` will now display man pages for commands rather just the
1583 `--help` text.][cargo/8456]
1584- [`cargo-metadata` now emits a `test` field indicating if a target has
1585 tests enabled.][cargo/8478]
1586- [`workspace.default-members` now respects `workspace.exclude`.][cargo/8485]
1587- [`cargo-publish` will now use an alternative registry by default if it's the
1588 only registry specified in `package.publish`.][cargo/8571]
1589
1590Misc
1591----
1592- [Added a help button beside Rustdoc's searchbar that explains rustdoc's
1593 type based search.][75366]
1594- [Added the Ayu theme to rustdoc.][71237]
1595
1596Compatibility Notes
1597-------------------
1598- [Bumped the minimum supported Emscripten version to 1.39.20.][75716]
1599- [Fixed a regression parsing `{} && false` in tail expressions.][74650]
1600- [Added changes to how proc-macros are expanded in `macro_rules!` that should
1601 help to preserve more span information.][73084] These changes may cause
1602 compiliation errors if your macro was unhygenic or didn't correctly handle
1603 `Delimiter::None`.
1604- [Moved support for the CloudABI target to tier 3.][75568]
1605- [`linux-gnu` targets now require minimum kernel 2.6.32 and glibc 2.11.][74163]
6c58768f
XL
1606- [Added the `rustc-docs` component.][75560] This allows you to install
1607 and read the documentation for the compiler internal APIs. (Currently only
1608 available for `x86_64-unknown-linux-gnu`.)
1609
1b1a35ee
XL
1610Internal Only
1611--------
2a314972
XL
1612
1613- [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.
1b1a35ee 1614
6c58768f 1615[1.47.0-cfg]: https://docs.microsoft.com/en-us/windows/win32/secbp/control-flow-guard
6c58768f
XL
1616[75048]: https://github.com/rust-lang/rust/pull/75048/
1617[74163]: https://github.com/rust-lang/rust/pull/74163/
1618[71237]: https://github.com/rust-lang/rust/pull/71237/
1619[74869]: https://github.com/rust-lang/rust/pull/74869/
1620[73858]: https://github.com/rust-lang/rust/pull/73858/
1621[75716]: https://github.com/rust-lang/rust/pull/75716/
1622[75908]: https://github.com/rust-lang/rust/pull/75908/
1623[75516]: https://github.com/rust-lang/rust/pull/75516/
1624[75560]: https://github.com/rust-lang/rust/pull/75560/
1625[75568]: https://github.com/rust-lang/rust/pull/75568/
1626[75366]: https://github.com/rust-lang/rust/pull/75366/
1627[75204]: https://github.com/rust-lang/rust/pull/75204/
1628[74650]: https://github.com/rust-lang/rust/pull/74650/
1629[74419]: https://github.com/rust-lang/rust/pull/74419/
1630[73964]: https://github.com/rust-lang/rust/pull/73964/
1631[74021]: https://github.com/rust-lang/rust/pull/74021/
1632[74060]: https://github.com/rust-lang/rust/pull/74060/
1633[73893]: https://github.com/rust-lang/rust/pull/73893/
1634[73526]: https://github.com/rust-lang/rust/pull/73526/
1635[73583]: https://github.com/rust-lang/rust/pull/73583/
1636[73084]: https://github.com/rust-lang/rust/pull/73084/
1637[73197]: https://github.com/rust-lang/rust/pull/73197/
1638[72488]: https://github.com/rust-lang/rust/pull/72488/
1639[cargo/8456]: https://github.com/rust-lang/cargo/pull/8456/
1640[cargo/8478]: https://github.com/rust-lang/cargo/pull/8478/
1641[cargo/8485]: https://github.com/rust-lang/cargo/pull/8485/
1642[cargo/8500]: https://github.com/rust-lang/cargo/pull/8500/
1643[cargo/8571]: https://github.com/rust-lang/cargo/pull/8571/
1644[`Ident::new_raw`]: https://doc.rust-lang.org/nightly/proc_macro/struct.Ident.html#method.new_raw
1645[`Range::is_empty`]: https://doc.rust-lang.org/nightly/std/ops/struct.Range.html#method.is_empty
1646[`RangeInclusive::is_empty`]: https://doc.rust-lang.org/nightly/std/ops/struct.RangeInclusive.html#method.is_empty
1647[`Result::as_deref_mut`]: https://doc.rust-lang.org/nightly/std/result/enum.Result.html#method.as_deref_mut
1648[`Result::as_deref`]: https://doc.rust-lang.org/nightly/std/result/enum.Result.html#method.as_deref
1649[`TypeId::of`]: https://doc.rust-lang.org/nightly/std/any/struct.TypeId.html#method.of
1650[`Vec::leak`]: https://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.leak
1651[`f32::TAU`]: https://doc.rust-lang.org/nightly/std/f32/consts/constant.TAU.html
1652[`f64::TAU`]: https://doc.rust-lang.org/nightly/std/f64/consts/constant.TAU.html
1653[`pointer::offset_from`]: https://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.offset_from
1654
1655
f9652781
XL
1656Version 1.46.0 (2020-08-27)
1657==========================
1658
1659Language
1660--------
1661- [`if`, `match`, and `loop` expressions can now be used in const functions.][72437]
1662- [Additionally you are now also able to coerce and cast to slices (`&[T]`) in
1663 const functions.][73862]
1664- [The `#[track_caller]` attribute can now be added to functions to use the
1665 function's caller's location information for panic messages.][72445]
1666- [Recursively indexing into tuples no longer needs parentheses.][71322] E.g.
1667 `x.0.0` over `(x.0).0`.
6c58768f 1668- [`mem::transmute` can now be used in statics and constants.][72920] **Note**
f9652781
XL
1669 You currently can't use `mem::transmute` in constant functions.
1670
1671Compiler
1672--------
1673- [You can now use the `cdylib` target on Apple iOS and tvOS platforms.][73516]
1674- [Enabled static "Position Independent Executables" by default
1675 for `x86_64-unknown-linux-musl`.][70740]
1676
1677Libraries
1678---------
1679- [`mem::forget` is now a `const fn`.][73887]
1680- [`String` now implements `From<char>`.][73466]
1681- [The `leading_ones`, and `trailing_ones` methods have been stabilised for all
1682 integer types.][73032]
1683- [`vec::IntoIter<T>` now implements `AsRef<[T]>`.][72583]
1684- [All non-zero integer types (`NonZeroU8`) now implement `TryFrom` for their
1685 zero-able equivalent (e.g. `TryFrom<u8>`).][72717]
1686- [`&[T]` and `&mut [T]` now implement `PartialEq<Vec<T>>`.][71660]
1687- [`(String, u16)` now implements `ToSocketAddrs`.][73007]
1688- [`vec::Drain<'_, T>` now implements `AsRef<[T]>`.][72584]
1689
1690Stabilized APIs
1691---------------
1692- [`Option::zip`]
1693- [`vec::Drain::as_slice`]
1694
1695Cargo
1696-----
1697Added a number of new environment variables that are now available when
1698compiling your crate.
1699
1700- [`CARGO_BIN_NAME` and `CARGO_CRATE_NAME`][cargo/8270] Providing the name of
1701 the specific binary being compiled and the name of the crate.
1702- [`CARGO_PKG_LICENSE`][cargo/8325] The license from the manifest of the package.
1703- [`CARGO_PKG_LICENSE_FILE`][cargo/8387] The path to the license file.
1704
1705Compatibility Notes
1706-------------------
1707- [The target configuration option `abi_blacklist` has been renamed
1708 to `unsupported_abis`.][74150] The old name will still continue to work.
6c58768f 1709- [Rustc will now warn if you cast a C-like enum that implements `Drop`.][72331]
f9652781
XL
1710 This was previously accepted but will become a hard error in a future release.
1711- [Rustc will fail to compile if you have a struct with
1712 `#[repr(i128)]` or `#[repr(u128)]`.][74109] This representation is currently only
1713 allowed on `enum`s.
1714- [Tokens passed to `macro_rules!` are now always captured.][73293] This helps
1715 ensure that spans have the correct information, and may cause breakage if you
1716 were relying on receiving spans with dummy information.
1717- [The InnoSetup installer for Windows is no longer available.][72569] This was
1718 a legacy installer that was replaced by a MSI installer a few years ago but
1719 was still being built.
1720- [`{f32, f64}::asinh` now returns the correct values for negative numbers.][72486]
1721- [Rustc will no longer accept overlapping trait implementations that only
1722 differ in how the lifetime was bound.][72493]
1723- [Rustc now correctly relates the lifetime of an existential associated
1724 type.][71896] This fixes some edge cases where `rustc` would erroneously allow
1725 you to pass a shorter lifetime than expected.
1726- [Rustc now dynamically links to `libz` (also called `zlib`) on Linux.][74420]
1727 The library will need to be installed for `rustc` to work, even though we
1728 expect it to be already available on most systems.
1729- [Tests annotated with `#[should_panic]` are broken on ARMv7 while running
1730 under QEMU.][74820]
1731- [Pretty printing of some tokens in procedural macros changed.][75453] The
1732 exact output returned by rustc's pretty printing is an unstable
1733 implementation detail: we recommend any macro relying on it to switch to a
1734 more robust parsing system.
1735
1736[75453]: https://github.com/rust-lang/rust/issues/75453/
1737[74820]: https://github.com/rust-lang/rust/issues/74820/
1738[74420]: https://github.com/rust-lang/rust/issues/74420/
1739[74109]: https://github.com/rust-lang/rust/pull/74109/
1740[74150]: https://github.com/rust-lang/rust/pull/74150/
1741[73862]: https://github.com/rust-lang/rust/pull/73862/
1742[73887]: https://github.com/rust-lang/rust/pull/73887/
1743[73466]: https://github.com/rust-lang/rust/pull/73466/
1744[73516]: https://github.com/rust-lang/rust/pull/73516/
1745[73293]: https://github.com/rust-lang/rust/pull/73293/
1746[73007]: https://github.com/rust-lang/rust/pull/73007/
1747[73032]: https://github.com/rust-lang/rust/pull/73032/
1748[72920]: https://github.com/rust-lang/rust/pull/72920/
1749[72569]: https://github.com/rust-lang/rust/pull/72569/
1750[72583]: https://github.com/rust-lang/rust/pull/72583/
1751[72584]: https://github.com/rust-lang/rust/pull/72584/
1752[72717]: https://github.com/rust-lang/rust/pull/72717/
1753[72437]: https://github.com/rust-lang/rust/pull/72437/
1754[72445]: https://github.com/rust-lang/rust/pull/72445/
1755[72486]: https://github.com/rust-lang/rust/pull/72486/
1756[72493]: https://github.com/rust-lang/rust/pull/72493/
1757[72331]: https://github.com/rust-lang/rust/pull/72331/
1758[71896]: https://github.com/rust-lang/rust/pull/71896/
1759[71660]: https://github.com/rust-lang/rust/pull/71660/
1760[71322]: https://github.com/rust-lang/rust/pull/71322/
1761[70740]: https://github.com/rust-lang/rust/pull/70740/
1762[cargo/8270]: https://github.com/rust-lang/cargo/pull/8270/
1763[cargo/8325]: https://github.com/rust-lang/cargo/pull/8325/
1764[cargo/8387]: https://github.com/rust-lang/cargo/pull/8387/
1765[`Option::zip`]: https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.zip
1766[`vec::Drain::as_slice`]: https://doc.rust-lang.org/stable/std/vec/struct.Drain.html#method.as_slice
1767
1768
1769Version 1.45.2 (2020-08-03)
1770==========================
1771
1772* [Fix bindings in tuple struct patterns][74954]
1773* [Fix track_caller integration with trait objects][74784]
1774
1775[74954]: https://github.com/rust-lang/rust/issues/74954
1776[74784]: https://github.com/rust-lang/rust/issues/74784
1777
1778
1779Version 1.45.1 (2020-07-30)
1780==========================
1781
1782* [Fix const propagation with references.][73613]
1783* [rustfmt accepts rustfmt_skip in cfg_attr again.][73078]
1784* [Avoid spurious implicit region bound.][74509]
1785* [Install clippy on x.py install][74457]
1786
1787[73613]: https://github.com/rust-lang/rust/pull/73613
1788[73078]: https://github.com/rust-lang/rust/issues/73078
1789[74509]: https://github.com/rust-lang/rust/pull/74509
1790[74457]: https://github.com/rust-lang/rust/pull/74457
1791
1792
f9f354fc
XL
1793Version 1.45.0 (2020-07-16)
1794==========================
1795
1796Language
1797--------
1798- [Out of range float to int conversions using `as` has been defined as a saturating
1799 conversion.][71269] This was previously undefined behaviour, but you can use the
1800 `{f64, f32}::to_int_unchecked` methods to continue using the current behaviour, which
1801 may be desirable in rare performance sensitive situations.
1802- [`mem::Discriminant<T>` now uses `T`'s discriminant type instead of always
1803 using `u64`.][70705]
1804- [Function like procedural macros can now be used in expression, pattern, and statement
1805 positions.][68717] This means you can now use a function-like procedural macro
1806 anywhere you can use a declarative (`macro_rules!`) macro.
1807
1808Compiler
1809--------
1810- [You can now override individual target features through the `target-feature`
1811 flag.][72094] E.g. `-C target-feature=+avx2 -C target-feature=+fma` is now
1812 equivalent to `-C target-feature=+avx2,+fma`.
1813- [Added the `force-unwind-tables` flag.][69984] This option allows
1814 rustc to always generate unwind tables regardless of panic strategy.
1815- [Added the `embed-bitcode` flag.][71716] This codegen flag allows rustc
1816 to include LLVM bitcode into generated `rlib`s (this is on by default).
1817- [Added the `tiny` value to the `code-model` codegen flag.][72397]
1818- [Added tier 3 support\* for the `mipsel-sony-psp` target.][72062]
1819- [Added tier 3 support for the `thumbv7a-uwp-windows-msvc` target.][72133]
2a314972 1820- [Upgraded to LLVM 10.][67759]
f9f354fc 1821
36d6ef2b 1822\* Refer to Rust's [platform support page][platform-support-doc] for more
f9f354fc
XL
1823information on Rust's tiered platform support.
1824
1825
1826Libraries
1827---------
1828- [`net::{SocketAddr, SocketAddrV4, SocketAddrV6}` now implements `PartialOrd`
1829 and `Ord`.][72239]
1830- [`proc_macro::TokenStream` now implements `Default`.][72234]
1831- [You can now use `char` with
1832 `ops::{Range, RangeFrom, RangeFull, RangeInclusive, RangeTo}` to iterate over
1833 a range of codepoints.][72413] E.g.
1834 you can now write the following;
1835 ```rust
1836 for ch in 'a'..='z' {
1837 print!("{}", ch);
1838 }
1839 println!();
1840 // Prints "abcdefghijklmnopqrstuvwxyz"
1841 ```
1842- [`OsString` now implements `FromStr`.][71662]
f9652781 1843- [The `saturating_neg` method has been added to all signed integer primitive
f9f354fc
XL
1844 types, and the `saturating_abs` method has been added for all integer
1845 primitive types.][71886]
1846- [`Arc<T>`, `Rc<T>` now implement `From<Cow<'_, T>>`, and `Box` now
1847 implements `From<Cow>` when `T` is `[T: Copy]`, `str`, `CStr`, `OsStr`,
1848 or `Path`.][71447]
1849- [`Box<[T]>` now implements `From<[T; N]>`.][71095]
1850- [`BitOr` and `BitOrAssign` are implemented for all `NonZero`
1851 integer types.][69813]
1852- [The `fetch_min`, and `fetch_max` methods have been added to all atomic
1853 integer types.][72324]
1854- [The `fetch_update` method has been added to all atomic integer types.][71843]
1855
1856Stabilized APIs
1857---------------
1858- [`Arc::as_ptr`]
1859- [`BTreeMap::remove_entry`]
1860- [`Rc::as_ptr`]
1861- [`rc::Weak::as_ptr`]
1862- [`rc::Weak::from_raw`]
1863- [`rc::Weak::into_raw`]
1864- [`str::strip_prefix`]
1865- [`str::strip_suffix`]
1866- [`sync::Weak::as_ptr`]
1867- [`sync::Weak::from_raw`]
1868- [`sync::Weak::into_raw`]
1869- [`char::UNICODE_VERSION`]
1870- [`Span::resolved_at`]
1871- [`Span::located_at`]
1872- [`Span::mixed_site`]
1873- [`unix::process::CommandExt::arg0`]
1874
1875Cargo
1876-----
1877
f9652781
XL
1878- [Cargo uses the `embed-bitcode` flag to optimize disk usage and build
1879 time.][cargo/8066]
1880
f9f354fc
XL
1881Misc
1882----
1883- [Rustdoc now supports strikethrough text in Markdown.][71928] E.g.
1884 `~~outdated information~~` becomes "~~outdated information~~".
1885- [Added an emoji to Rustdoc's deprecated API message.][72014]
1886
1887Compatibility Notes
1888-------------------
1889- [Trying to self initialize a static value (that is creating a value using
1890 itself) is unsound and now causes a compile error.][71140]
1891- [`{f32, f64}::powi` now returns a slightly different value on Windows.][73420]
1892 This is due to changes in LLVM's intrinsics which `{f32, f64}::powi` uses.
1893- [Rustdoc's CLI's extra error exit codes have been removed.][71900] These were
1894 previously undocumented and not intended for public use. Rustdoc still provides
1895 a non-zero exit code on errors.
f9652781
XL
1896- [Rustc's `lto` flag is incompatible with the new `embed-bitcode=no`.][71848]
1897 This may cause issues if LTO is enabled through `RUSTFLAGS` or `cargo rustc`
1898 flags while cargo is adding `embed-bitcode` itself. The recommended way to
1899 control LTO is with Cargo profiles, either in `Cargo.toml` or `.cargo/config`,
1900 or by setting `CARGO_PROFILE_<name>_LTO` in the environment.
f9f354fc
XL
1901
1902Internals Only
1903--------------
1904- [Make clippy a git subtree instead of a git submodule][70655]
1905- [Unify the undo log of all snapshot types][69464]
1906
f9652781 1907[71848]: https://github.com/rust-lang/rust/issues/71848/
f9f354fc
XL
1908[73420]: https://github.com/rust-lang/rust/issues/73420/
1909[72324]: https://github.com/rust-lang/rust/pull/72324/
1910[71843]: https://github.com/rust-lang/rust/pull/71843/
1911[71886]: https://github.com/rust-lang/rust/pull/71886/
1912[72234]: https://github.com/rust-lang/rust/pull/72234/
1913[72239]: https://github.com/rust-lang/rust/pull/72239/
1914[72397]: https://github.com/rust-lang/rust/pull/72397/
1915[72413]: https://github.com/rust-lang/rust/pull/72413/
1916[72014]: https://github.com/rust-lang/rust/pull/72014/
1917[72062]: https://github.com/rust-lang/rust/pull/72062/
1918[72094]: https://github.com/rust-lang/rust/pull/72094/
1919[72133]: https://github.com/rust-lang/rust/pull/72133/
2a314972 1920[67759]: https://github.com/rust-lang/rust/pull/67759/
f9f354fc
XL
1921[71900]: https://github.com/rust-lang/rust/pull/71900/
1922[71928]: https://github.com/rust-lang/rust/pull/71928/
1923[71662]: https://github.com/rust-lang/rust/pull/71662/
1924[71716]: https://github.com/rust-lang/rust/pull/71716/
1925[71447]: https://github.com/rust-lang/rust/pull/71447/
1926[71269]: https://github.com/rust-lang/rust/pull/71269/
1927[71095]: https://github.com/rust-lang/rust/pull/71095/
1928[71140]: https://github.com/rust-lang/rust/pull/71140/
1929[70655]: https://github.com/rust-lang/rust/pull/70655/
1930[70705]: https://github.com/rust-lang/rust/pull/70705/
1931[69984]: https://github.com/rust-lang/rust/pull/69984/
1932[69813]: https://github.com/rust-lang/rust/pull/69813/
1933[69464]: https://github.com/rust-lang/rust/pull/69464/
1934[68717]: https://github.com/rust-lang/rust/pull/68717/
f9652781 1935[cargo/8066]: https://github.com/rust-lang/cargo/pull/8066
f9f354fc
XL
1936[`Arc::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.as_ptr
1937[`BTreeMap::remove_entry`]: https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html#method.remove_entry
1938[`Rc::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.as_ptr
1939[`rc::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.as_ptr
1940[`rc::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.from_raw
1941[`rc::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.into_raw
1942[`sync::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.as_ptr
1943[`sync::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.from_raw
1944[`sync::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.into_raw
1945[`str::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_prefix
1946[`str::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_suffix
1947[`char::UNICODE_VERSION`]: https://doc.rust-lang.org/stable/std/char/constant.UNICODE_VERSION.html
1948[`Span::resolved_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.resolved_at
1949[`Span::located_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.located_at
1950[`Span::mixed_site`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.mixed_site
1951[`unix::process::CommandExt::arg0`]: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html#tymethod.arg0
1952
1953
ba9703b0
XL
1954Version 1.44.1 (2020-06-18)
1955===========================
1956
1957* [rustfmt accepts rustfmt_skip in cfg_attr again.][73078]
1958* [Don't hash executable filenames on apple platforms, fixing backtraces.][cargo/8329]
1959* [Fix crashes when finding backtrace on macOS.][71397]
1960* [Clippy applies lint levels into different files.][clippy/5356]
1961
1962[71397]: https://github.com/rust-lang/rust/issues/71397
1963[73078]: https://github.com/rust-lang/rust/issues/73078
1964[cargo/8329]: https://github.com/rust-lang/cargo/pull/8329
1965[clippy/5356]: https://github.com/rust-lang/rust-clippy/issues/5356
1966
f9f354fc 1967
ba9703b0
XL
1968Version 1.44.0 (2020-06-04)
1969==========================
1970
1971Language
1972--------
1973- [You can now use `async/.await` with `#[no_std]` enabled.][69033]
1974- [Added the `unused_braces` lint.][70081]
1975
1976**Syntax-only changes**
1977
1978- [Expansion-driven outline module parsing][69838]
1979```rust
1980#[cfg(FALSE)]
1981mod foo {
1982 mod bar {
1983 mod baz; // `foo/bar/baz.rs` doesn't exist, but no error!
1984 }
1985}
1986```
1987
1988These are still rejected semantically, so you will likely receive an error but
1989these changes can be seen and parsed by macros and conditional compilation.
1990
1991Compiler
1992--------
1993- [Rustc now respects the `-C codegen-units` flag in incremental mode.][70156]
1994 Additionally when in incremental mode rustc defaults to 256 codegen units.
f9f354fc 1995- [Refactored `catch_unwind` to have zero-cost, unless unwinding is enabled and
ba9703b0
XL
1996 a panic is thrown.][67502]
1997- [Added tier 3\* support for the `aarch64-unknown-none` and
1998 `aarch64-unknown-none-softfloat` targets.][68334]
1999- [Added tier 3 support for `arm64-apple-tvos` and
2000 `x86_64-apple-tvos` targets.][68191]
2001
2002
2003Libraries
2004---------
2005- [Special cased `vec![]` to map directly to `Vec::new()`.][70632] This allows
2006 `vec![]` to be able to be used in `const` contexts.
2007- [`convert::Infallible` now implements `Hash`.][70281]
2008- [`OsString` now implements `DerefMut` and `IndexMut` returning
2009 a `&mut OsStr`.][70048]
2010- [Unicode 13 is now supported.][69929]
2011- [`String` now implements `From<&mut str>`.][69661]
2012- [`IoSlice` now implements `Copy`.][69403]
f9f354fc 2013- [`Vec<T>` now implements `From<[T; N]>`.][68692] Where `N` is at most 32.
ba9703b0
XL
2014- [`proc_macro::LexError` now implements `fmt::Display` and `Error`.][68899]
2015- [`from_le_bytes`, `to_le_bytes`, `from_be_bytes`, `to_be_bytes`,
2016 `from_ne_bytes`, and `to_ne_bytes` methods are now `const` for all
2017 integer types.][69373]
2018
2019Stabilized APIs
2020---------------
2021- [`PathBuf::with_capacity`]
2022- [`PathBuf::capacity`]
2023- [`PathBuf::clear`]
2024- [`PathBuf::reserve`]
2025- [`PathBuf::reserve_exact`]
2026- [`PathBuf::shrink_to_fit`]
2027- [`f32::to_int_unchecked`]
2028- [`f64::to_int_unchecked`]
2029- [`Layout::align_to`]
2030- [`Layout::pad_to_align`]
2031- [`Layout::array`]
2032- [`Layout::extend`]
2033
2034Cargo
2035-----
2036- [Added the `cargo tree` command which will print a tree graph of
2037 your dependencies.][cargo/8062] E.g.
2038 ```
2039 mdbook v0.3.2 (/Users/src/rust/mdbook)
2040 ├── ammonia v3.0.0
2041 │ ├── html5ever v0.24.0
2042 │ │ ├── log v0.4.8
2043 │ │ │ └── cfg-if v0.1.9
2044 │ │ ├── mac v0.1.1
2045 │ │ └── markup5ever v0.9.0
2046 │ │ ├── log v0.4.8 (*)
2047 │ │ ├── phf v0.7.24
2048 │ │ │ └── phf_shared v0.7.24
2049 │ │ │ ├── siphasher v0.2.3
2050 │ │ │ └── unicase v1.4.2
2051 │ │ │ [build-dependencies]
2052 │ │ │ └── version_check v0.1.5
2053 ...
2054 ```
2055 You can also display dependencies on multiple versions of the same crate with
2056 `cargo tree -d` (short for `cargo tree --duplicates`).
2057
2058Misc
2059----
2060- [Rustdoc now allows you to specify `--crate-version` to have rustdoc include
2061 the version in the sidebar.][69494]
2062
2063Compatibility Notes
2064-------------------
2065- [Rustc now correctly generates static libraries on Windows GNU targets with
2066 the `.a` extension, rather than the previous `.lib`.][70937]
2067- [Removed the `-C no_integrated_as` flag from rustc.][70345]
2068- [The `file_name` property in JSON output of macro errors now points the actual
2069 source file rather than the previous format of `<NAME macros>`.][70969]
f9f354fc 2070 **Note:** this may not point to a file that actually exists on the user's system.
ba9703b0
XL
2071- [The minimum required external LLVM version has been bumped to LLVM 8.][71147]
2072- [`mem::{zeroed, uninitialised}` will now panic when used with types that do
2073 not allow zero initialization such as `NonZeroU8`.][66059] This was
2074 previously a warning.
2075- [In 1.45.0 (the next release) converting a `f64` to `u32` using the `as`
2076 operator has been defined as a saturating operation.][71269] This was previously
f9f354fc
XL
2077 undefined behaviour, but you can use the `{f64, f32}::to_int_unchecked` methods to
2078 continue using the current behaviour, which may be desirable in rare performance
ba9703b0
XL
2079 sensitive situations.
2080
2081Internal Only
2082-------------
2083These changes provide no direct user facing benefits, but represent significant
2084improvements to the internals and overall performance of rustc and
2085related tools.
2086
2087- [dep_graph Avoid allocating a set on when the number reads are small.][69778]
2088- [Replace big JS dict with JSON parsing.][71250]
2089
2090[69373]: https://github.com/rust-lang/rust/pull/69373/
2091[66059]: https://github.com/rust-lang/rust/pull/66059/
2092[68191]: https://github.com/rust-lang/rust/pull/68191/
2093[68899]: https://github.com/rust-lang/rust/pull/68899/
2094[71147]: https://github.com/rust-lang/rust/pull/71147/
2095[71250]: https://github.com/rust-lang/rust/pull/71250/
2096[70937]: https://github.com/rust-lang/rust/pull/70937/
2097[70969]: https://github.com/rust-lang/rust/pull/70969/
2098[70632]: https://github.com/rust-lang/rust/pull/70632/
2099[70281]: https://github.com/rust-lang/rust/pull/70281/
2100[70345]: https://github.com/rust-lang/rust/pull/70345/
2101[70048]: https://github.com/rust-lang/rust/pull/70048/
2102[70081]: https://github.com/rust-lang/rust/pull/70081/
2103[70156]: https://github.com/rust-lang/rust/pull/70156/
2104[71269]: https://github.com/rust-lang/rust/pull/71269/
2105[69838]: https://github.com/rust-lang/rust/pull/69838/
2106[69929]: https://github.com/rust-lang/rust/pull/69929/
2107[69661]: https://github.com/rust-lang/rust/pull/69661/
2108[69778]: https://github.com/rust-lang/rust/pull/69778/
2109[69494]: https://github.com/rust-lang/rust/pull/69494/
2110[69403]: https://github.com/rust-lang/rust/pull/69403/
2111[69033]: https://github.com/rust-lang/rust/pull/69033/
2112[68692]: https://github.com/rust-lang/rust/pull/68692/
2113[68334]: https://github.com/rust-lang/rust/pull/68334/
2114[67502]: https://github.com/rust-lang/rust/pull/67502/
2115[cargo/8062]: https://github.com/rust-lang/cargo/pull/8062/
2116[`PathBuf::with_capacity`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.with_capacity
2117[`PathBuf::capacity`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.capacity
2118[`PathBuf::clear`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.clear
2119[`PathBuf::reserve`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.reserve
2120[`PathBuf::reserve_exact`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.reserve_exact
2121[`PathBuf::shrink_to_fit`]: https://doc.rust-lang.org/std/path/struct.PathBuf.html#method.shrink_to_fit
2122[`f32::to_int_unchecked`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_int_unchecked
2123[`f64::to_int_unchecked`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_int_unchecked
2124[`Layout::align_to`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.align_to
2125[`Layout::pad_to_align`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.pad_to_align
2126[`Layout::array`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.array
2127[`Layout::extend`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html#method.extend
2128
2129
2130Version 1.43.1 (2020-05-07)
2131===========================
2132
2133* [Updated openssl-src to 1.1.1g for CVE-2020-1967.][71430]
2134* [Fixed the stabilization of AVX-512 features.][71473]
2135* [Fixed `cargo package --list` not working with unpublished dependencies.][cargo/8151]
2136
2137[71430]: https://github.com/rust-lang/rust/pull/71430
2138[71473]: https://github.com/rust-lang/rust/issues/71473
2139[cargo/8151]: https://github.com/rust-lang/cargo/issues/8151
2140
2141
74b04a01
XL
2142Version 1.43.0 (2020-04-23)
2143==========================
2144
2145Language
2146--------
2147- [Fixed using binary operations with `&{number}` (e.g. `&1.0`) not having
2148 the type inferred correctly.][68129]
2149- [Attributes such as `#[cfg()]` can now be used on `if` expressions.][69201]
2150
2151**Syntax only changes**
2152- [Allow `type Foo: Ord` syntactically.][69361]
2153- [Fuse associated and extern items up to defaultness.][69194]
2154- [Syntactically allow `self` in all `fn` contexts.][68764]
2155- [Merge `fn` syntax + cleanup item parsing.][68728]
2156- [`item` macro fragments can be interpolated into `trait`s, `impl`s, and `extern` blocks.][69366]
2157 For example, you may now write:
ba9703b0 2158 ```rust
74b04a01
XL
2159 macro_rules! mac_trait {
2160 ($i:item) => {
2161 trait T { $i }
2162 }
2163 }
2164 mac_trait! {
2165 fn foo() {}
2166 }
2167 ```
2168
2169These are still rejected *semantically*, so you will likely receive an error but
2170these changes can be seen and parsed by macros and
2171conditional compilation.
2172
2173
2174Compiler
2175--------
2176- [You can now pass multiple lint flags to rustc to override the previous
2177 flags.][67885] For example; `rustc -D unused -A unused-variables` denies
2178 everything in the `unused` lint group except `unused-variables` which
2179 is explicitly allowed. However, passing `rustc -A unused-variables -D unused` denies
2180 everything in the `unused` lint group **including** `unused-variables` since
2181 the allow flag is specified before the deny flag (and therefore overridden).
2182- [rustc will now prefer your system MinGW libraries over its bundled libraries
2183 if they are available on `windows-gnu`.][67429]
2184- [rustc now buffers errors/warnings printed in JSON.][69227]
2185
2186Libraries
2187---------
2188- [`Arc<[T; N]>`, `Box<[T; N]>`, and `Rc<[T; N]>`, now implement
2189 `TryFrom<Arc<[T]>>`,`TryFrom<Box<[T]>>`, and `TryFrom<Rc<[T]>>`
2190 respectively.][69538] **Note** These conversions are only available when `N`
2191 is `0..=32`.
2192- [You can now use associated constants on floats and integers directly, rather
2193 than having to import the module.][68952] e.g. You can now write `u32::MAX` or
2194 `f32::NAN` with no imports.
2195- [`u8::is_ascii` is now `const`.][68984]
2196- [`String` now implements `AsMut<str>`.][68742]
2197- [Added the `primitive` module to `std` and `core`.][67637] This module
2198 reexports Rust's primitive types. This is mainly useful in macros
2199 where you want avoid these types being shadowed.
2200- [Relaxed some of the trait bounds on `HashMap` and `HashSet`.][67642]
2201- [`string::FromUtf8Error` now implements `Clone + Eq`.][68738]
2202
2203Stabilized APIs
2204---------------
2205- [`Once::is_completed`]
2206- [`f32::LOG10_2`]
2207- [`f32::LOG2_10`]
2208- [`f64::LOG10_2`]
2209- [`f64::LOG2_10`]
2210- [`iter::once_with`]
2211
2212Cargo
2213-----
2214- [You can now set config `[profile]`s in your `.cargo/config`, or through
2215 your environment.][cargo/7823]
2216- [Cargo will now set `CARGO_BIN_EXE_<name>` pointing to a binary's
2217 executable path when running integration tests or benchmarks.][cargo/7697]
2218 `<name>` is the name of your binary as-is e.g. If you wanted the executable
2219 path for a binary named `my-program`you would use `env!("CARGO_BIN_EXE_my-program")`.
2220
2221Misc
2222----
2223- [Certain checks in the `const_err` lint were deemed unrelated to const
2224 evaluation][69185], and have been moved to the `unconditional_panic` and
2225 `arithmetic_overflow` lints.
ba9703b0 2226
74b04a01
XL
2227Compatibility Notes
2228-------------------
2229
2230- [Having trailing syntax in the `assert!` macro is now a hard error.][69548] This
2231 has been a warning since 1.36.0.
2232- [Fixed `Self` not having the correctly inferred type.][69340] This incorrectly
2233 led to some instances being accepted, and now correctly emits a hard error.
2234
2235[69340]: https://github.com/rust-lang/rust/pull/69340
2236
2237Internal Only
2238-------------
2239These changes provide no direct user facing benefits, but represent significant
2240improvements to the internals and overall performance of `rustc` and
2241related tools.
2242
2243- [All components are now built with `opt-level=3` instead of `2`.][67878]
2244- [Improved how rustc generates drop code.][67332]
2245- [Improved performance from `#[inline]`-ing certain hot functions.][69256]
2246- [traits: preallocate 2 Vecs of known initial size][69022]
2247- [Avoid exponential behaviour when relating types][68772]
2248- [Skip `Drop` terminators for enum variants without drop glue][68943]
2249- [Improve performance of coherence checks][68966]
2250- [Deduplicate types in the generator witness][68672]
2251- [Invert control in struct_lint_level.][68725]
2252
2253[67332]: https://github.com/rust-lang/rust/pull/67332/
2254[67429]: https://github.com/rust-lang/rust/pull/67429/
2255[67637]: https://github.com/rust-lang/rust/pull/67637/
2256[67642]: https://github.com/rust-lang/rust/pull/67642/
2257[67878]: https://github.com/rust-lang/rust/pull/67878/
2258[67885]: https://github.com/rust-lang/rust/pull/67885/
2259[68129]: https://github.com/rust-lang/rust/pull/68129/
2260[68672]: https://github.com/rust-lang/rust/pull/68672/
2261[68725]: https://github.com/rust-lang/rust/pull/68725/
2262[68728]: https://github.com/rust-lang/rust/pull/68728/
2263[68738]: https://github.com/rust-lang/rust/pull/68738/
2264[68742]: https://github.com/rust-lang/rust/pull/68742/
2265[68764]: https://github.com/rust-lang/rust/pull/68764/
2266[68772]: https://github.com/rust-lang/rust/pull/68772/
2267[68943]: https://github.com/rust-lang/rust/pull/68943/
2268[68952]: https://github.com/rust-lang/rust/pull/68952/
2269[68966]: https://github.com/rust-lang/rust/pull/68966/
2270[68984]: https://github.com/rust-lang/rust/pull/68984/
2271[69022]: https://github.com/rust-lang/rust/pull/69022/
2272[69185]: https://github.com/rust-lang/rust/pull/69185/
2273[69194]: https://github.com/rust-lang/rust/pull/69194/
2274[69201]: https://github.com/rust-lang/rust/pull/69201/
2275[69227]: https://github.com/rust-lang/rust/pull/69227/
2276[69548]: https://github.com/rust-lang/rust/pull/69548/
2277[69256]: https://github.com/rust-lang/rust/pull/69256/
2278[69361]: https://github.com/rust-lang/rust/pull/69361/
2279[69366]: https://github.com/rust-lang/rust/pull/69366/
2280[69538]: https://github.com/rust-lang/rust/pull/69538/
2281[cargo/7823]: https://github.com/rust-lang/cargo/pull/7823
2282[cargo/7697]: https://github.com/rust-lang/cargo/pull/7697
2283[`Once::is_completed`]: https://doc.rust-lang.org/std/sync/struct.Once.html#method.is_completed
2284[`f32::LOG10_2`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG10_2.html
2285[`f32::LOG2_10`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG2_10.html
2286[`f64::LOG10_2`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG10_2.html
2287[`f64::LOG2_10`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG2_10.html
2288[`iter::once_with`]: https://doc.rust-lang.org/std/iter/fn.once_with.html
2289
2290
dfeec247
XL
2291Version 1.42.0 (2020-03-12)
2292==========================
2293
2294Language
2295--------
2296- [You can now use the slice pattern syntax with subslices.][67712] e.g.
2297 ```rust
2298 fn foo(words: &[&str]) {
2299 match words {
2300 ["Hello", "World", "!", ..] => println!("Hello World!"),
2301 ["Foo", "Bar", ..] => println!("Baz"),
2302 rest => println!("{:?}", rest),
2303 }
2304 }
2305 ```
2306- [You can now use `#[repr(transparent)]` on univariant `enum`s.][68122] Meaning
2307 that you can create an enum that has the exact layout and ABI of the type
2308 it contains.
17df50a5 2309- [You can now use outer attribute procedural macros on inline modules.][64273]
dfeec247
XL
2310- [There are some *syntax-only* changes:][67131]
2311 - `default` is syntactically allowed before items in `trait` definitions.
2312 - Items in `impl`s (i.e. `const`s, `type`s, and `fn`s) may syntactically
2313 leave out their bodies in favor of `;`.
2314 - Bounds on associated types in `impl`s are now syntactically allowed
2315 (e.g. `type Foo: Ord;`).
2316 - `...` (the C-variadic type) may occur syntactically directly as the type of
2317 any function parameter.
ba9703b0 2318
dfeec247
XL
2319 These are still rejected *semantically*, so you will likely receive an error
2320 but these changes can be seen and parsed by procedural macros and
2321 conditional compilation.
2322
2323Compiler
2324--------
2325- [Added tier 2\* support for `armv7a-none-eabi`.][68253]
2326- [Added tier 2 support for `riscv64gc-unknown-linux-gnu`.][68339]
2327- [`Option::{expect,unwrap}` and
2328 `Result::{expect, expect_err, unwrap, unwrap_err}` now produce panic messages
2329 pointing to the location where they were called, rather than
2330 `core`'s internals. ][67887]
2331
36d6ef2b 2332\* Refer to Rust's [platform support page][platform-support-doc] for more
dfeec247
XL
2333information on Rust's tiered platform support.
2334
2335Libraries
2336---------
2337- [`iter::Empty<T>` now implements `Send` and `Sync` for any `T`.][68348]
2338- [`Pin::{map_unchecked, map_unchecked_mut}` no longer require the return type
2339 to implement `Sized`.][67935]
2340- [`io::Cursor` now derives `PartialEq` and `Eq`.][67233]
2341- [`Layout::new` is now `const`.][66254]
2342- [Added Standard Library support for `riscv64gc-unknown-linux-gnu`.][66899]
2343
2344
2345Stabilized APIs
2346---------------
2347- [`CondVar::wait_while`]
2348- [`CondVar::wait_timeout_while`]
2349- [`DebugMap::key`]
2350- [`DebugMap::value`]
2351- [`ManuallyDrop::take`]
2352- [`matches!`]
2353- [`ptr::slice_from_raw_parts_mut`]
2354- [`ptr::slice_from_raw_parts`]
2355
2356Cargo
2357-----
2358- [You no longer need to include `extern crate proc_macro;` to be able to
2359 `use proc_macro;` in the `2018` edition.][cargo/7700]
2360
2361Compatibility Notes
2362-------------------
2363- [`Error::description` has been deprecated, and its use will now produce a
2364 warning.][66919] It's recommended to use `Display`/`to_string` instead.
74b04a01 2365
dfeec247
XL
2366[68253]: https://github.com/rust-lang/rust/pull/68253/
2367[68348]: https://github.com/rust-lang/rust/pull/68348/
2368[67935]: https://github.com/rust-lang/rust/pull/67935/
2369[68339]: https://github.com/rust-lang/rust/pull/68339/
2370[68122]: https://github.com/rust-lang/rust/pull/68122/
17df50a5 2371[64273]: https://github.com/rust-lang/rust/pull/64273/
dfeec247
XL
2372[67712]: https://github.com/rust-lang/rust/pull/67712/
2373[67887]: https://github.com/rust-lang/rust/pull/67887/
2374[67131]: https://github.com/rust-lang/rust/pull/67131/
2375[67233]: https://github.com/rust-lang/rust/pull/67233/
2376[66899]: https://github.com/rust-lang/rust/pull/66899/
2377[66919]: https://github.com/rust-lang/rust/pull/66919/
2378[66254]: https://github.com/rust-lang/rust/pull/66254/
2379[cargo/7700]: https://github.com/rust-lang/cargo/pull/7700
2380[`DebugMap::key`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.key
2381[`DebugMap::value`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.value
2382[`ManuallyDrop::take`]: https://doc.rust-lang.org/stable/std/mem/struct.ManuallyDrop.html#method.take
2383[`matches!`]: https://doc.rust-lang.org/stable/std/macro.matches.html
2384[`ptr::slice_from_raw_parts_mut`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts_mut.html
2385[`ptr::slice_from_raw_parts`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts.html
2386[`CondVar::wait_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_while
2387[`CondVar::wait_timeout_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_timeout_while
2388
2389
60c5eb7d
XL
2390Version 1.41.1 (2020-02-27)
2391===========================
2392
2393* [Always check types of static items][69145]
2394* [Always check lifetime bounds of `Copy` impls][69145]
2395* [Fix miscompilation in callers of `Layout::repeat`][69225]
2396
2397[69225]: https://github.com/rust-lang/rust/issues/69225
2398[69145]: https://github.com/rust-lang/rust/pull/69145
2399
dfeec247 2400
60c5eb7d
XL
2401Version 1.41.0 (2020-01-30)
2402===========================
2403
2404Language
2405--------
2406
2407- [You can now pass type parameters to foreign items when implementing
2408 traits.][65879] E.g. You can now write `impl<T> From<Foo> for Vec<T> {}`.
2409- [You can now arbitrarily nest receiver types in the `self` position.][64325] E.g. you can
2410 now write `fn foo(self: Box<Box<Self>>) {}`. Previously only `Self`, `&Self`,
2411 `&mut Self`, `Arc<Self>`, `Rc<Self>`, and `Box<Self>` were allowed.
2412- [You can now use any valid identifier in a `format_args` macro.][66847]
2413 Previously identifiers starting with an underscore were not allowed.
2414- [Visibility modifiers (e.g. `pub`) are now syntactically allowed on trait items and
2415 enum variants.][66183] These are still rejected semantically, but
2416 can be seen and parsed by procedural macros and conditional compilation.
2417
2418Compiler
2419--------
2420
2421- [Rustc will now warn if you have unused loop `'label`s.][66325]
2422- [Removed support for the `i686-unknown-dragonfly` target.][67255]
2423- [Added tier 3 support\* for the `riscv64gc-unknown-linux-gnu` target.][66661]
2424- [You can now pass an arguments file passing the `@path` syntax
2425 to rustc.][66172] Note that the format differs somewhat from what is
2426 found in other tooling; please see [the documentation][argfile-docs] for
2427 more information.
2428- [You can now provide `--extern` flag without a path, indicating that it is
2429 available from the search path or specified with an `-L` flag.][64882]
2430
36d6ef2b 2431\* Refer to Rust's [platform support page][platform-support-doc] for more
60c5eb7d
XL
2432information on Rust's tiered platform support.
2433
2434[argfile-docs]: https://doc.rust-lang.org/nightly/rustc/command-line-arguments.html#path-load-command-line-flags-from-a-path
2435
2436Libraries
2437---------
2438
2439- [The `core::panic` module is now stable.][66771] It was already stable
2440 through `std`.
2441- [`NonZero*` numerics now implement `From<NonZero*>` if it's a smaller integer
2442 width.][66277] E.g. `NonZeroU16` now implements `From<NonZeroU8>`.
2443- [`MaybeUninit<T>` now implements `fmt::Debug`.][65013]
2444
2445Stabilized APIs
2446---------------
2447
2448- [`Result::map_or`]
2449- [`Result::map_or_else`]
2450- [`std::rc::Weak::weak_count`]
2451- [`std::rc::Weak::strong_count`]
2452- [`std::sync::Weak::weak_count`]
2453- [`std::sync::Weak::strong_count`]
2454
2455Cargo
2456-----
2457
2458- [Cargo will now document all the private items for binary crates
2459 by default.][cargo/7593]
2460- [`cargo-install` will now reinstall the package if it detects that it is out
2461 of date.][cargo/7560]
2462- [Cargo.lock now uses a more git friendly format that should help to reduce
2463 merge conflicts.][cargo/7579]
2464- [You can now override specific dependencies's build settings][cargo/7591] E.g.
2465 `[profile.dev.package.image] opt-level = 2` sets the `image` crate's
2466 optimisation level to `2` for debug builds. You can also use
2467 `[profile.<profile>.build-override]` to override build scripts and
2468 their dependencies.
2469
2470Misc
2471----
2472
2473- [You can now specify `edition` in documentation code blocks to compile the block
2474 for that edition.][66238] E.g. `edition2018` tells rustdoc that the code sample
2475 should be compiled the 2018 edition of Rust.
2476- [You can now provide custom themes to rustdoc with `--theme`, and check the
2477 current theme with `--check-theme`.][54733]
2478- [You can use `#[cfg(doc)]` to compile an item when building documentation.][61351]
2479
2480Compatibility Notes
2481-------------------
2482
2483- [As previously announced 1.41.0 will be the last tier 1 release for 32-bit
2484 Apple targets.][apple-32bit-drop] This means that the source code is still
2485 available to build, but the targets are no longer being tested and release
2486 binaries for those platforms will no longer be distributed by the Rust project.
2487 Please refer to the linked blog post for more information.
2488
2489[54733]: https://github.com/rust-lang/rust/pull/54733/
2490[61351]: https://github.com/rust-lang/rust/pull/61351/
2491[67255]: https://github.com/rust-lang/rust/pull/67255/
2492[66661]: https://github.com/rust-lang/rust/pull/66661/
2493[66771]: https://github.com/rust-lang/rust/pull/66771/
2494[66847]: https://github.com/rust-lang/rust/pull/66847/
2495[66238]: https://github.com/rust-lang/rust/pull/66238/
2496[66277]: https://github.com/rust-lang/rust/pull/66277/
2497[66325]: https://github.com/rust-lang/rust/pull/66325/
2498[66172]: https://github.com/rust-lang/rust/pull/66172/
2499[66183]: https://github.com/rust-lang/rust/pull/66183/
2500[65879]: https://github.com/rust-lang/rust/pull/65879/
2501[65013]: https://github.com/rust-lang/rust/pull/65013/
2502[64882]: https://github.com/rust-lang/rust/pull/64882/
2503[64325]: https://github.com/rust-lang/rust/pull/64325/
2504[cargo/7560]: https://github.com/rust-lang/cargo/pull/7560/
2505[cargo/7579]: https://github.com/rust-lang/cargo/pull/7579/
2506[cargo/7591]: https://github.com/rust-lang/cargo/pull/7591/
2507[cargo/7593]: https://github.com/rust-lang/cargo/pull/7593/
2508[`Result::map_or_else`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.map_or_else
2509[`Result::map_or`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.map_or
2510[`std::rc::Weak::weak_count`]: https://doc.rust-lang.org/std/rc/struct.Weak.html#method.weak_count
2511[`std::rc::Weak::strong_count`]: https://doc.rust-lang.org/std/rc/struct.Weak.html#method.strong_count
2512[`std::sync::Weak::weak_count`]: https://doc.rust-lang.org/std/sync/struct.Weak.html#method.weak_count
2513[`std::sync::Weak::strong_count`]: https://doc.rust-lang.org/std/sync/struct.Weak.html#method.strong_count
2514[apple-32bit-drop]: https://blog.rust-lang.org/2020/01/03/reducing-support-for-32-bit-apple-targets.html
2515
2516Version 1.40.0 (2019-12-19)
2517===========================
2518
2519Language
2520--------
2521- [You can now use tuple `struct`s and tuple `enum` variant's constructors in
2522 `const` contexts.][65188] e.g.
2523
2524 ```rust
2525 pub struct Point(i32, i32);
2526
2527 const ORIGIN: Point = {
2528 let constructor = Point;
2529
2530 constructor(0, 0)
2531 };
2532 ```
2533
2534- [You can now mark `struct`s, `enum`s, and `enum` variants with the `#[non_exhaustive]` attribute to
2535 indicate that there may be variants or fields added in the future.][64639]
2536 For example this requires adding a wild-card branch (`_ => {}`) to any match
2537 statements on a non-exhaustive `enum`. [(RFC 2008)]
2538- [You can now use function-like procedural macros in `extern` blocks and in
2539 type positions.][63931] e.g. `type Generated = macro!();`
2540- [Function-like and attribute procedural macros can now emit
2541 `macro_rules!` items, so you can now have your macros generate macros.][64035]
2542- [The `meta` pattern matcher in `macro_rules!` now correctly matches the modern
2543 attribute syntax.][63674] For example `(#[$m:meta])` now matches `#[attr]`,
2544 `#[attr{tokens}]`, `#[attr[tokens]]`, and `#[attr(tokens)]`.
2545
2546Compiler
2547--------
2548- [Added tier 3 support\* for the
2549 `thumbv7neon-unknown-linux-musleabihf` target.][66103]
2550- [Added tier 3 support for the
2551 `aarch64-unknown-none-softfloat` target.][64589]
2552- [Added tier 3 support for the `mips64-unknown-linux-muslabi64`, and
2553 `mips64el-unknown-linux-muslabi64` targets.][65843]
2554
36d6ef2b 2555\* Refer to Rust's [platform support page][platform-support-doc] for more
60c5eb7d
XL
2556 information on Rust's tiered platform support.
2557
2558Libraries
2559---------
2560- [The `is_power_of_two` method on unsigned numeric types is now a `const` function.][65092]
2561
2562Stabilized APIs
2563---------------
2564- [`BTreeMap::get_key_value`]
2565- [`HashMap::get_key_value`]
2566- [`Option::as_deref_mut`]
2567- [`Option::as_deref`]
2568- [`Option::flatten`]
2569- [`UdpSocket::peer_addr`]
2570- [`f32::to_be_bytes`]
2571- [`f32::to_le_bytes`]
2572- [`f32::to_ne_bytes`]
2573- [`f64::to_be_bytes`]
2574- [`f64::to_le_bytes`]
2575- [`f64::to_ne_bytes`]
2576- [`f32::from_be_bytes`]
2577- [`f32::from_le_bytes`]
2578- [`f32::from_ne_bytes`]
2579- [`f64::from_be_bytes`]
2580- [`f64::from_le_bytes`]
2581- [`f64::from_ne_bytes`]
2582- [`mem::take`]
2583- [`slice::repeat`]
2584- [`todo!`]
2585
2586Cargo
2587-----
2588- [Cargo will now always display warnings, rather than only on
2589 fresh builds.][cargo/7450]
2590- [Feature flags (except `--all-features`) passed to a virtual workspace will
2591 now produce an error.][cargo/7507] Previously these flags were ignored.
2592- [You can now publish `dev-dependencies` without including
2593 a `version`.][cargo/7333]
2594
2595Misc
2596----
2597- [You can now specify the `#[cfg(doctest)]` attribute to include an item only
2598 when running documentation tests with `rustdoc`.][63803]
2599
2600Compatibility Notes
2601-------------------
2602- [As previously announced, any previous NLL warnings in the 2015 edition are
2603 now hard errors.][64221]
2604- [The `include!` macro will now warn if it failed to include the
2605 entire file.][64284] The `include!` macro unintentionally only includes the
2606 first _expression_ in a file, and this can be unintuitive. This will become
2607 either a hard error in a future release, or the behavior may be fixed to include all expressions as expected.
2608- [Using `#[inline]` on function prototypes and consts now emits a warning under
2609 `unused_attribute` lint.][65294] Using `#[inline]` anywhere else inside traits
2610 or `extern` blocks now correctly emits a hard error.
ba9703b0 2611
60c5eb7d
XL
2612[65294]: https://github.com/rust-lang/rust/pull/65294/
2613[66103]: https://github.com/rust-lang/rust/pull/66103/
2614[65843]: https://github.com/rust-lang/rust/pull/65843/
2615[65188]: https://github.com/rust-lang/rust/pull/65188/
2616[65092]: https://github.com/rust-lang/rust/pull/65092/
2617[64589]: https://github.com/rust-lang/rust/pull/64589/
2618[64639]: https://github.com/rust-lang/rust/pull/64639/
2619[64221]: https://github.com/rust-lang/rust/pull/64221/
2620[64284]: https://github.com/rust-lang/rust/pull/64284/
2621[63931]: https://github.com/rust-lang/rust/pull/63931/
2622[64035]: https://github.com/rust-lang/rust/pull/64035/
2623[63674]: https://github.com/rust-lang/rust/pull/63674/
2624[63803]: https://github.com/rust-lang/rust/pull/63803/
2625[cargo/7450]: https://github.com/rust-lang/cargo/pull/7450/
2626[cargo/7507]: https://github.com/rust-lang/cargo/pull/7507/
2627[cargo/7525]: https://github.com/rust-lang/cargo/pull/7525/
2628[cargo/7333]: https://github.com/rust-lang/cargo/pull/7333/
2629[(rfc 2008)]: https://rust-lang.github.io/rfcs/2008-non-exhaustive.html
2630[`f32::to_be_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_be_bytes
2631[`f32::to_le_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_le_bytes
2632[`f32::to_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_ne_bytes
2633[`f64::to_be_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_be_bytes
2634[`f64::to_le_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_le_bytes
2635[`f64::to_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_ne_bytes
2636[`f32::from_be_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_be_bytes
2637[`f32::from_le_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_le_bytes
2638[`f32::from_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_ne_bytes
2639[`f64::from_be_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_be_bytes
2640[`f64::from_le_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_le_bytes
2641[`f64::from_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_ne_bytes
2642[`option::flatten`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.flatten
2643[`option::as_deref`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_deref
2644[`option::as_deref_mut`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_deref_mut
2645[`hashmap::get_key_value`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.get_key_value
2646[`btreemap::get_key_value`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.get_key_value
2647[`slice::repeat`]: https://doc.rust-lang.org/std/primitive.slice.html#method.repeat
2648[`mem::take`]: https://doc.rust-lang.org/std/mem/fn.take.html
2649[`udpsocket::peer_addr`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html#method.peer_addr
2650[`todo!`]: https://doc.rust-lang.org/std/macro.todo.html
2651
2652
e1599b0c
XL
2653Version 1.39.0 (2019-11-07)
2654===========================
2655
2656Language
2657--------
2658- [You can now create `async` functions and blocks with `async fn`, `async move {}`, and
2659 `async {}` respectively, and you can now call `.await` on async expressions.][63209]
2660- [You can now use certain attributes on function, closure, and function pointer
2661 parameters.][64010] These attributes include `cfg`, `cfg_attr`, `allow`, `warn`,
2662 `deny`, `forbid` as well as inert helper attributes used by procedural macro
2663 attributes applied to items. e.g.
2664 ```rust
2665 fn len(
2666 #[cfg(windows)] slice: &[u16],
2667 #[cfg(not(windows))] slice: &[u8],
2668 ) -> usize {
2669 slice.len()
2670 }
2671 ```
2672- [You can now take shared references to bind-by-move patterns in the `if` guards
2673 of `match` arms.][63118] e.g.
2674 ```rust
2675 fn main() {
2676 let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]);
2677
2678 match array {
2679 nums
2680 // ---- `nums` is bound by move.
2681 if nums.iter().sum::<u8>() == 10
2682 // ^------ `.iter()` implicitly takes a reference to `nums`.
2683 => {
2684 drop(nums);
2685 // ----------- Legal as `nums` was bound by move and so we have ownership.
2686 }
2687 _ => unreachable!(),
2688 }
2689 }
2690 ```
2691
2692
2693
2694Compiler
2695--------
2696- [Added tier 3\* support for the `i686-unknown-uefi` target.][64334]
2697- [Added tier 3 support for the `sparc64-unknown-openbsd` target.][63595]
2698- [rustc will now trim code snippets in diagnostics to fit in your terminal.][63402]
2699 **Note** Cargo currently doesn't use this feature. Refer to
2700 [cargo#7315][cargo/7315] to track this feature's progress.
2701- [You can now pass `--show-output` argument to test binaries to print the
2702 output of successful tests.][62600]
2703
2704
36d6ef2b 2705\* Refer to Rust's [platform support page][platform-support-doc] for more
e1599b0c
XL
2706information on Rust's tiered platform support.
2707
2708Libraries
2709---------
2710- [`Vec::new` and `String::new` are now `const` functions.][64028]
2711- [`LinkedList::new` is now a `const` function.][63684]
2712- [`str::len`, `[T]::len` and `str::as_bytes` are now `const` functions.][63770]
2713- [The `abs`, `wrapping_abs`, and `overflowing_abs` numeric functions are
2714 now `const`.][63786]
2715
2716Stabilized APIs
2717---------------
2718- [`Pin::into_inner`]
2719- [`Instant::checked_duration_since`]
2720- [`Instant::saturating_duration_since`]
2721
2722Cargo
2723-----
2724- [You can now publish git dependencies if supplied with a `version`.][cargo/7237]
2725- [The `--all` flag has been renamed to `--workspace`.][cargo/7241] Using
2726 `--all` is now deprecated.
2727
2728Misc
2729----
2730- [You can now pass `-Clinker` to rustdoc to control the linker used
2731 for compiling doctests.][63834]
2732
2733Compatibility Notes
2734-------------------
2735- [Code that was previously accepted by the old borrow checker, but rejected by
2736 the NLL borrow checker is now a hard error in Rust 2018.][63565] This was
2737 previously a warning, and will also become a hard error in the Rust 2015
2738 edition in the 1.40.0 release.
2739- [`rustdoc` now requires `rustc` to be installed and in the same directory to
2740 run tests.][63827] This should improve performance when running a large
2741 amount of doctests.
2742- [The `try!` macro will now issue a deprecation warning.][62672] It is
2743 recommended to use the `?` operator instead.
2744- [`asinh(-0.0)` now correctly returns `-0.0`.][63698] Previously this
2745 returned `0.0`.
2746
2747[62600]: https://github.com/rust-lang/rust/pull/62600/
2748[62672]: https://github.com/rust-lang/rust/pull/62672/
2749[63118]: https://github.com/rust-lang/rust/pull/63118/
2750[63209]: https://github.com/rust-lang/rust/pull/63209/
2751[63402]: https://github.com/rust-lang/rust/pull/63402/
2752[63565]: https://github.com/rust-lang/rust/pull/63565/
2753[63595]: https://github.com/rust-lang/rust/pull/63595/
2754[63684]: https://github.com/rust-lang/rust/pull/63684/
2755[63698]: https://github.com/rust-lang/rust/pull/63698/
2756[63770]: https://github.com/rust-lang/rust/pull/63770/
2757[63786]: https://github.com/rust-lang/rust/pull/63786/
2758[63827]: https://github.com/rust-lang/rust/pull/63827/
2759[63834]: https://github.com/rust-lang/rust/pull/63834/
2760[63927]: https://github.com/rust-lang/rust/pull/63927/
2761[63933]: https://github.com/rust-lang/rust/pull/63933/
2762[63934]: https://github.com/rust-lang/rust/pull/63934/
2763[63938]: https://github.com/rust-lang/rust/pull/63938/
2764[63940]: https://github.com/rust-lang/rust/pull/63940/
2765[63941]: https://github.com/rust-lang/rust/pull/63941/
2766[63945]: https://github.com/rust-lang/rust/pull/63945/
2767[64010]: https://github.com/rust-lang/rust/pull/64010/
2768[64028]: https://github.com/rust-lang/rust/pull/64028/
2769[64334]: https://github.com/rust-lang/rust/pull/64334/
2770[cargo/7237]: https://github.com/rust-lang/cargo/pull/7237/
2771[cargo/7241]: https://github.com/rust-lang/cargo/pull/7241/
2772[cargo/7315]: https://github.com/rust-lang/cargo/pull/7315/
2773[`Pin::into_inner`]: https://doc.rust-lang.org/std/pin/struct.Pin.html#method.into_inner
2774[`Instant::checked_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_duration_since
2775[`Instant::saturating_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.saturating_duration_since
2776
416331ca
XL
2777Version 1.38.0 (2019-09-26)
2778==========================
2779
2780Language
2781--------
2782- [The `#[global_allocator]` attribute can now be used in submodules.][62735]
2783- [The `#[deprecated]` attribute can now be used on macros.][62042]
2784
2785Compiler
2786--------
2787- [Added pipelined compilation support to `rustc`.][62766] This will
2788 improve compilation times in some cases. For further information please refer
2789 to the [_"Evaluating pipelined rustc compilation"_][pipeline-internals] thread.
2790- [Added tier 3\* support for the `aarch64-uwp-windows-msvc`, `i686-uwp-windows-gnu`,
2791 `i686-uwp-windows-msvc`, `x86_64-uwp-windows-gnu`, and
2792 `x86_64-uwp-windows-msvc` targets.][60260]
2793- [Added tier 3 support for the `armv7-unknown-linux-gnueabi` and
2794 `armv7-unknown-linux-musleabi` targets.][63107]
2795- [Added tier 3 support for the `hexagon-unknown-linux-musl` target.][62814]
2796- [Added tier 3 support for the `riscv32i-unknown-none-elf` target.][62784]
2a314972 2797- [Upgraded to LLVM 9.][62592]
416331ca 2798
36d6ef2b 2799\* Refer to Rust's [platform support page][platform-support-doc] for more
416331ca
XL
2800information on Rust's tiered platform support.
2801
2802Libraries
2803---------
2804- [`ascii::EscapeDefault` now implements `Clone` and `Display`.][63421]
2805- [Derive macros for prelude traits (e.g. `Clone`, `Debug`, `Hash`) are now
2806 available at the same path as the trait.][63056] (e.g. The `Clone` derive macro
2807 is available at `std::clone::Clone`). This also makes all built-in macros
2808 available in `std`/`core` root. e.g. `std::include_bytes!`.
2809- [`str::Chars` now implements `Debug`.][63000]
2810- [`slice::{concat, connect, join}` now accepts `&[T]` in addition to `&T`.][62528]
2811- [`*const T` and `*mut T` now implement `marker::Unpin`.][62583]
2812- [`Arc<[T]>` and `Rc<[T]>` now implement `FromIterator<T>`.][61953]
2813- [Added euclidean remainder and division operations (`div_euclid`,
2814 `rem_euclid`) to all numeric primitives.][61884] Additionally `checked`,
2815 `overflowing`, and `wrapping` versions are available for all
2816 integer primitives.
2817- [`thread::AccessError` now implements `Clone`, `Copy`, `Eq`, `Error`, and
2818 `PartialEq`.][61491]
2819- [`iter::{StepBy, Peekable, Take}` now implement `DoubleEndedIterator`.][61457]
2820
2821Stabilized APIs
2822---------------
2823- [`<*const T>::cast`]
2824- [`<*mut T>::cast`]
2825- [`Duration::as_secs_f32`]
2826- [`Duration::as_secs_f64`]
416331ca
XL
2827- [`Duration::div_f32`]
2828- [`Duration::div_f64`]
2829- [`Duration::from_secs_f32`]
2830- [`Duration::from_secs_f64`]
2831- [`Duration::mul_f32`]
2832- [`Duration::mul_f64`]
2833- [`any::type_name`]
2834
2835Cargo
2836-----
2837- [Added pipelined compilation support to `cargo`.][cargo/7143]
2838- [You can now pass the `--features` option multiple times to enable
2839 multiple features.][cargo/7084]
2840
36d6ef2b
XL
2841Rustdoc
2842-------
2843
2844- [Documentation on `pub use` statements is prepended to the documentation of the re-exported item][63048]
2845
416331ca
XL
2846Misc
2847----
2848- [`rustc` will now warn about some incorrect uses of
2849 `mem::{uninitialized, zeroed}` that are known to cause undefined behaviour.][63346]
2850
2851Compatibility Notes
2852-------------------
e1599b0c
XL
2853- The [`x86_64-unknown-uefi` platform can not be built][62785] with rustc
2854 1.38.0.
2855- The [`armv7-unknown-linux-gnueabihf` platform is known to have
2856 issues][62896] with certain crates such as libc.
416331ca
XL
2857
2858[60260]: https://github.com/rust-lang/rust/pull/60260/
2859[61457]: https://github.com/rust-lang/rust/pull/61457/
2860[61491]: https://github.com/rust-lang/rust/pull/61491/
2861[61884]: https://github.com/rust-lang/rust/pull/61884/
2862[61953]: https://github.com/rust-lang/rust/pull/61953/
2863[62042]: https://github.com/rust-lang/rust/pull/62042/
2864[62528]: https://github.com/rust-lang/rust/pull/62528/
2865[62583]: https://github.com/rust-lang/rust/pull/62583/
2866[62735]: https://github.com/rust-lang/rust/pull/62735/
2867[62766]: https://github.com/rust-lang/rust/pull/62766/
2868[62784]: https://github.com/rust-lang/rust/pull/62784/
2a314972 2869[62592]: https://github.com/rust-lang/rust/pull/62592/
416331ca
XL
2870[62785]: https://github.com/rust-lang/rust/issues/62785/
2871[62814]: https://github.com/rust-lang/rust/pull/62814/
2872[62896]: https://github.com/rust-lang/rust/issues/62896/
2873[63000]: https://github.com/rust-lang/rust/pull/63000/
2874[63056]: https://github.com/rust-lang/rust/pull/63056/
2875[63107]: https://github.com/rust-lang/rust/pull/63107/
2876[63346]: https://github.com/rust-lang/rust/pull/63346/
2877[63421]: https://github.com/rust-lang/rust/pull/63421/
2878[cargo/7084]: https://github.com/rust-lang/cargo/pull/7084/
2879[cargo/7143]: https://github.com/rust-lang/cargo/pull/7143/
36d6ef2b 2880[63048]: https://github.com/rust-lang/rust/pull/63048
416331ca
XL
2881[`<*const T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast
2882[`<*mut T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast
2883[`Duration::as_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f32
2884[`Duration::as_secs_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f64
416331ca
XL
2885[`Duration::div_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f32
2886[`Duration::div_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f64
2887[`Duration::from_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f32
2888[`Duration::from_secs_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f64
2889[`Duration::mul_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f32
2890[`Duration::mul_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f64
2891[`any::type_name`]: https://doc.rust-lang.org/std/any/fn.type_name.html
36d6ef2b 2892[platform-support-doc]: https://doc.rust-lang.org/nightly/rustc/platform-support.html
416331ca
XL
2893[pipeline-internals]: https://internals.rust-lang.org/t/evaluating-pipelined-rustc-compilation/10199
2894
dc9dc135
XL
2895Version 1.37.0 (2019-08-15)
2896==========================
2897
2898Language
2899--------
2900- `#[must_use]` will now warn if the type is contained in a [tuple][61100],
2901 [`Box`][62228], or an [array][62235] and unused.
2902- [You can now use the `cfg` and `cfg_attr` attributes on
2903 generic parameters.][61547]
2904- [You can now use enum variants through type alias.][61682] e.g. You can
2905 write the following:
2906 ```rust
2907 type MyOption = Option<u8>;
2908
2909 fn increment_or_zero(x: MyOption) -> u8 {
2910 match x {
2911 MyOption::Some(y) => y + 1,
2912 MyOption::None => 0,
2913 }
2914 }
2915 ```
2916- [You can now use `_` as an identifier for consts.][61347] e.g. You can write
2917 `const _: u32 = 5;`.
2918- [You can now use `#[repr(align(X)]` on enums.][61229]
416331ca 2919- [The `?` Kleene macro operator is now available in the
dc9dc135
XL
2920 2015 edition.][60932]
2921
2922Compiler
2923--------
2924- [You can now enable Profile-Guided Optimization with the `-C profile-generate`
2925 and `-C profile-use` flags.][61268] For more information on how to use profile
2926 guided optimization, please refer to the [rustc book][rustc-book-pgo].
2927- [The `rust-lldb` wrapper script should now work again.][61827]
2928
2929Libraries
2930---------
2931- [`mem::MaybeUninit<T>` is now ABI-compatible with `T`.][61802]
2932
2933Stabilized APIs
2934---------------
2935- [`BufReader::buffer`]
2936- [`BufWriter::buffer`]
2937- [`Cell::from_mut`]
2938- [`Cell<[T]>::as_slice_of_cells`][`Cell<slice>::as_slice_of_cells`]
2939- [`DoubleEndedIterator::nth_back`]
2940- [`Option::xor`]
2941- [`Wrapping::reverse_bits`]
2942- [`i128::reverse_bits`]
2943- [`i16::reverse_bits`]
2944- [`i32::reverse_bits`]
2945- [`i64::reverse_bits`]
2946- [`i8::reverse_bits`]
2947- [`isize::reverse_bits`]
2948- [`slice::copy_within`]
2949- [`u128::reverse_bits`]
2950- [`u16::reverse_bits`]
2951- [`u32::reverse_bits`]
2952- [`u64::reverse_bits`]
2953- [`u8::reverse_bits`]
2954- [`usize::reverse_bits`]
2955
2956Cargo
2957-----
2958- [`Cargo.lock` files are now included by default when publishing executable crates
2959 with executables.][cargo/7026]
2960- [You can now specify `default-run="foo"` in `[package]` to specify the
2961 default executable to use for `cargo run`.][cargo/7056]
2962
2963Misc
2964----
2965
2966Compatibility Notes
2967-------------------
2968- [Using `...` for inclusive range patterns will now warn by default.][61342]
2969 Please transition your code to using the `..=` syntax for inclusive
2970 ranges instead.
2971- [Using a trait object without the `dyn` will now warn by default.][61203]
2972 Please transition your code to use `dyn Trait` for trait objects instead.
2973
2974[62228]: https://github.com/rust-lang/rust/pull/62228/
2975[62235]: https://github.com/rust-lang/rust/pull/62235/
2976[61802]: https://github.com/rust-lang/rust/pull/61802/
2977[61827]: https://github.com/rust-lang/rust/pull/61827/
2978[61547]: https://github.com/rust-lang/rust/pull/61547/
2979[61682]: https://github.com/rust-lang/rust/pull/61682/
2980[61268]: https://github.com/rust-lang/rust/pull/61268/
2981[61342]: https://github.com/rust-lang/rust/pull/61342/
2982[61347]: https://github.com/rust-lang/rust/pull/61347/
2983[61100]: https://github.com/rust-lang/rust/pull/61100/
2984[61203]: https://github.com/rust-lang/rust/pull/61203/
2985[61229]: https://github.com/rust-lang/rust/pull/61229/
2986[60932]: https://github.com/rust-lang/rust/pull/60932/
2987[cargo/7026]: https://github.com/rust-lang/cargo/pull/7026/
2988[cargo/7056]: https://github.com/rust-lang/cargo/pull/7056/
2989[`BufReader::buffer`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.buffer
2990[`BufWriter::buffer`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html#method.buffer
2991[`Cell::from_mut`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.from_mut
2992[`Cell<slice>::as_slice_of_cells`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells
2993[`DoubleEndedIterator::nth_back`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.nth_back
2994[`Option::xor`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.xor
2995[`RefCell::try_borrow_unguarded`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_unguarded
2996[`Wrapping::reverse_bits`]: https://doc.rust-lang.org/std/num/struct.Wrapping.html#method.reverse_bits
2997[`i128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i128.html#method.reverse_bits
2998[`i16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i16.html#method.reverse_bits
2999[`i32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i32.html#method.reverse_bits
3000[`i64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i64.html#method.reverse_bits
3001[`i8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i8.html#method.reverse_bits
3002[`isize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.isize.html#method.reverse_bits
3003[`slice::copy_within`]: https://doc.rust-lang.org/std/primitive.slice.html#method.copy_within
3004[`u128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u128.html#method.reverse_bits
3005[`u16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u16.html#method.reverse_bits
3006[`u32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u32.html#method.reverse_bits
3007[`u64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u64.html#method.reverse_bits
3008[`u8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u8.html#method.reverse_bits
3009[`usize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.usize.html#method.reverse_bits
3010[rustc-book-pgo]: https://doc.rust-lang.org/rustc/profile-guided-optimization.html
3011
3012
48663c56
XL
3013Version 1.36.0 (2019-07-04)
3014==========================
3015
3016Language
3017--------
3018- [Non-Lexical Lifetimes are now enabled on the 2015 edition.][59114]
3019- [The order of traits in trait objects no longer affects the semantics of that
3020 object.][59445] e.g. `dyn Send + fmt::Debug` is now equivalent to
3021 `dyn fmt::Debug + Send`, where this was previously not the case.
3022
3023Libraries
3024---------
3025- [`HashMap`'s implementation has been replaced with `hashbrown::HashMap` implementation.][58623]
3026- [`TryFromSliceError` now implements `From<Infallible>`.][60318]
3027- [`mem::needs_drop` is now available as a const fn.][60364]
3028- [`alloc::Layout::from_size_align_unchecked` is now available as a const fn.][60370]
3029- [`String` now implements `BorrowMut<str>`.][60404]
3030- [`io::Cursor` now implements `Default`.][60234]
3031- [Both `NonNull::{dangling, cast}` are now const fns.][60244]
3032- [The `alloc` crate is now stable.][59675] `alloc` allows you to use a subset
3033 of `std` (e.g. `Vec`, `Box`, `Arc`) in `#![no_std]` environments if the
3034 environment has access to heap memory allocation.
3035- [`String` now implements `From<&String>`.][59825]
3036- [You can now pass multiple arguments to the `dbg!` macro.][59826] `dbg!` will
3037 return a tuple of each argument when there is multiple arguments.
3038- [`Result::{is_err, is_ok}` are now `#[must_use]` and will produce a warning if
3039 not used.][59648]
3040
3041Stabilized APIs
3042---------------
3043- [`VecDeque::rotate_left`]
3044- [`VecDeque::rotate_right`]
3045- [`Iterator::copied`]
3046- [`io::IoSlice`]
3047- [`io::IoSliceMut`]
3048- [`Read::read_vectored`]
3049- [`Write::write_vectored`]
3050- [`str::as_mut_ptr`]
3051- [`mem::MaybeUninit`]
3052- [`pointer::align_offset`]
3053- [`future::Future`]
3054- [`task::Context`]
3055- [`task::RawWaker`]
3056- [`task::RawWakerVTable`]
3057- [`task::Waker`]
3058- [`task::Poll`]
3059
3060Cargo
3061-----
3062- [Cargo will now produce an error if you attempt to use the name of a required dependency as a feature.][cargo/6860]
3063- [You can now pass the `--offline` flag to run cargo without accessing the network.][cargo/6934]
3064
3065You can find further change's in [Cargo's 1.36.0 release notes][cargo-1-36-0].
3066
3067Clippy
3068------
3069There have been numerous additions and fixes to clippy, see [Clippy's 1.36.0 release notes][clippy-1-36-0] for more details.
3070
3071Misc
3072----
3073
3074Compatibility Notes
3075-------------------
48663c56 3076- With the stabilisation of `mem::MaybeUninit`, `mem::uninitialized` use is no
416331ca 3077 longer recommended, and will be deprecated in 1.39.0.
48663c56
XL
3078
3079[60318]: https://github.com/rust-lang/rust/pull/60318/
3080[60364]: https://github.com/rust-lang/rust/pull/60364/
3081[60370]: https://github.com/rust-lang/rust/pull/60370/
3082[60404]: https://github.com/rust-lang/rust/pull/60404/
3083[60234]: https://github.com/rust-lang/rust/pull/60234/
3084[60244]: https://github.com/rust-lang/rust/pull/60244/
3085[58623]: https://github.com/rust-lang/rust/pull/58623/
3086[59648]: https://github.com/rust-lang/rust/pull/59648/
3087[59675]: https://github.com/rust-lang/rust/pull/59675/
3088[59825]: https://github.com/rust-lang/rust/pull/59825/
3089[59826]: https://github.com/rust-lang/rust/pull/59826/
3090[59445]: https://github.com/rust-lang/rust/pull/59445/
3091[59114]: https://github.com/rust-lang/rust/pull/59114/
3092[cargo/6860]: https://github.com/rust-lang/cargo/pull/6860/
3093[cargo/6934]: https://github.com/rust-lang/cargo/pull/6934/
3094[`VecDeque::rotate_left`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_left
3095[`VecDeque::rotate_right`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_right
3096[`Iterator::copied`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#tymethod.copied
3097[`io::IoSlice`]: https://doc.rust-lang.org/std/io/struct.IoSlice.html
3098[`io::IoSliceMut`]: https://doc.rust-lang.org/std/io/struct.IoSliceMut.html
3099[`Read::read_vectored`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_vectored
3100[`Write::write_vectored`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_vectored
3101[`str::as_mut_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_mut_ptr
3102[`mem::MaybeUninit`]: https://doc.rust-lang.org/std/mem/union.MaybeUninit.html
3103[`pointer::align_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.align_offset
3104[`future::Future`]: https://doc.rust-lang.org/std/future/trait.Future.html
3105[`task::Context`]: https://doc.rust-lang.org/beta/std/task/struct.Context.html
3106[`task::RawWaker`]: https://doc.rust-lang.org/beta/std/task/struct.RawWaker.html
3107[`task::RawWakerVTable`]: https://doc.rust-lang.org/beta/std/task/struct.RawWakerVTable.html
3108[`task::Waker`]: https://doc.rust-lang.org/beta/std/task/struct.Waker.html
3109[`task::Poll`]: https://doc.rust-lang.org/beta/std/task/enum.Poll.html
3110[clippy-1-36-0]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-136
3111[cargo-1-36-0]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-136-2019-07-04
416331ca 3112
48663c56 3113
532ac7d7
XL
3114Version 1.35.0 (2019-05-23)
3115==========================
3116
3117Language
3118--------
3119- [`FnOnce`, `FnMut`, and the `Fn` traits are now implemented for `Box<FnOnce>`,
3120 `Box<FnMut>`, and `Box<Fn>` respectively.][59500]
3121- [You can now coerce closures into unsafe function pointers.][59580] e.g.
3122 ```rust
3123 unsafe fn call_unsafe(func: unsafe fn()) {
3124 func()
3125 }
3126
3127 pub fn main() {
3128 unsafe { call_unsafe(|| {}); }
3129 }
3130 ```
3131
3132
3133Compiler
3134--------
3135- [Added the `armv6-unknown-freebsd-gnueabihf` and
3136 `armv7-unknown-freebsd-gnueabihf` targets.][58080]
3137- [Added the `wasm32-unknown-wasi` target.][59464]
3138
3139
3140Libraries
3141---------
3142- [`Thread` will now show its ID in `Debug` output.][59460]
3143- [`StdinLock`, `StdoutLock`, and `StderrLock` now implement `AsRawFd`.][59512]
3144- [`alloc::System` now implements `Default`.][59451]
3145- [Expanded `Debug` output (`{:#?}`) for structs now has a trailing comma on the
3146 last field.][59076]
3147- [`char::{ToLowercase, ToUppercase}` now
3148 implement `ExactSizeIterator`.][58778]
3149- [All `NonZero` numeric types now implement `FromStr`.][58717]
3150- [Removed the `Read` trait bounds
3151 on the `BufReader::{get_ref, get_mut, into_inner}` methods.][58423]
3152- [You can now call the `dbg!` macro without any parameters to print the file
3153 and line where it is called.][57847]
3154- [In place ASCII case conversions are now up to 4× faster.][59283]
3155 e.g. `str::make_ascii_lowercase`
3156- [`hash_map::{OccupiedEntry, VacantEntry}` now implement `Sync`
3157 and `Send`.][58369]
3158
3159Stabilized APIs
3160---------------
3161- [`f32::copysign`]
3162- [`f64::copysign`]
3163- [`RefCell::replace_with`]
3164- [`RefCell::map_split`]
3165- [`ptr::hash`]
3166- [`Range::contains`]
3167- [`RangeFrom::contains`]
3168- [`RangeTo::contains`]
3169- [`RangeInclusive::contains`]
3170- [`RangeToInclusive::contains`]
3171- [`Option::copied`]
3172
3173Cargo
3174-----
3175- [You can now set `cargo:rustc-cdylib-link-arg` at build time to pass custom
3176 linker arguments when building a `cdylib`.][cargo/6298] Its usage is highly
3177 platform specific.
48663c56 3178
532ac7d7
XL
3179Misc
3180----
3181- [The Rust toolchain is now available natively for musl based distros.][58575]
3182
3183[59460]: https://github.com/rust-lang/rust/pull/59460/
3184[59464]: https://github.com/rust-lang/rust/pull/59464/
3185[59500]: https://github.com/rust-lang/rust/pull/59500/
3186[59512]: https://github.com/rust-lang/rust/pull/59512/
3187[59580]: https://github.com/rust-lang/rust/pull/59580/
3188[59283]: https://github.com/rust-lang/rust/pull/59283/
3189[59451]: https://github.com/rust-lang/rust/pull/59451/
3190[59076]: https://github.com/rust-lang/rust/pull/59076/
3191[58778]: https://github.com/rust-lang/rust/pull/58778/
3192[58717]: https://github.com/rust-lang/rust/pull/58717/
3193[58369]: https://github.com/rust-lang/rust/pull/58369/
3194[58423]: https://github.com/rust-lang/rust/pull/58423/
3195[58080]: https://github.com/rust-lang/rust/pull/58080/
3196[57847]: https://github.com/rust-lang/rust/pull/57847/
3197[58575]: https://github.com/rust-lang/rust/pull/58575
3198[cargo/6298]: https://github.com/rust-lang/cargo/pull/6298/
3199[`f32::copysign`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.copysign
3200[`f64::copysign`]: https://doc.rust-lang.org/stable/std/primitive.f64.html#method.copysign
3201[`RefCell::replace_with`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.replace_with
3202[`RefCell::map_split`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.map_split
3203[`ptr::hash`]: https://doc.rust-lang.org/stable/std/ptr/fn.hash.html
3204[`Range::contains`]: https://doc.rust-lang.org/std/ops/struct.Range.html#method.contains
3205[`RangeFrom::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeFrom.html#method.contains
3206[`RangeTo::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeTo.html#method.contains
3207[`RangeInclusive::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.contains
3208[`RangeToInclusive::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeToInclusive.html#method.contains
3209[`Option::copied`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.copied
3210
9fa01778
XL
3211Version 1.34.2 (2019-05-14)
3212===========================
3213
3214* [Destabilize the `Error::type_id` function due to a security
532ac7d7 3215 vulnerability][60785] ([CVE-2019-12083])
9fa01778
XL
3216
3217[60785]: https://github.com/rust-lang/rust/pull/60785
532ac7d7 3218[CVE-2019-12083]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2019-12083
9fa01778
XL
3219
3220Version 1.34.1 (2019-04-25)
3221===========================
3222
3223* [Fix false positives for the `redundant_closure` Clippy lint][clippy/3821]
3224* [Fix false positives for the `missing_const_for_fn` Clippy lint][clippy/3844]
3225* [Fix Clippy panic when checking some macros][clippy/3805]
3226
3227[clippy/3821]: https://github.com/rust-lang/rust-clippy/pull/3821
3228[clippy/3844]: https://github.com/rust-lang/rust-clippy/pull/3844
3229[clippy/3805]: https://github.com/rust-lang/rust-clippy/pull/3805
3230
3231Version 1.34.0 (2019-04-11)
3232==========================
3233
3234Language
3235--------
3236- [You can now use `#[deprecated = "reason"]`][58166] as a shorthand for
3237 `#[deprecated(note = "reason")]`. This was previously allowed by mistake
3238 but had no effect.
3239- [You can now accept token streams in `#[attr()]`,`#[attr[]]`, and
3240 `#[attr{}]` procedural macros.][57367]
3241- [You can now write `extern crate self as foo;`][57407] to import your
3242 crate's root into the extern prelude.
3243
3244
3245Compiler
3246--------
3247- [You can now target `riscv64imac-unknown-none-elf` and
3248 `riscv64gc-unknown-none-elf`.][58406]
3249- [You can now enable linker plugin LTO optimisations with
3250 `-C linker-plugin-lto`.][58057] This allows rustc to compile your Rust code
3251 into LLVM bitcode allowing LLVM to perform LTO optimisations across C/C++ FFI
3252 boundaries.
3253- [You can now target `powerpc64-unknown-freebsd`.][57809]
3254
3255
3256Libraries
3257---------
3258- [The trait bounds have been removed on some of `HashMap<K, V, S>`'s and
3259 `HashSet<T, S>`'s basic methods.][58370] Most notably you no longer require
3260 the `Hash` trait to create an iterator.
3261- [The `Ord` trait bounds have been removed on some of `BinaryHeap<T>`'s basic
3262 methods.][58421] Most notably you no longer require the `Ord` trait to create
3263 an iterator.
3264- [The methods `overflowing_neg` and `wrapping_neg` are now `const` functions
3265 for all numeric types.][58044]
3266- [Indexing a `str` is now generic over all types that
3267 implement `SliceIndex<str>`.][57604]
3268- [`str::trim`, `str::trim_matches`, `str::trim_{start, end}`, and
3269 `str::trim_{start, end}_matches` are now `#[must_use]`][57106] and will
3270 produce a warning if their returning type is unused.
3271- [The methods `checked_pow`, `saturating_pow`, `wrapping_pow`, and
3272 `overflowing_pow` are now available for all numeric types.][57873] These are
dc9dc135 3273 equivalent to methods such as `wrapping_add` for the `pow` operation.
9fa01778
XL
3274
3275
3276Stabilized APIs
3277---------------
3278
3279#### std & core
3280* [`Any::type_id`]
3281* [`Error::type_id`]
3282* [`atomic::AtomicI16`]
3283* [`atomic::AtomicI32`]
3284* [`atomic::AtomicI64`]
3285* [`atomic::AtomicI8`]
3286* [`atomic::AtomicU16`]
3287* [`atomic::AtomicU32`]
3288* [`atomic::AtomicU64`]
3289* [`atomic::AtomicU8`]
3290* [`convert::Infallible`]
3291* [`convert::TryFrom`]
3292* [`convert::TryInto`]
3293* [`iter::from_fn`]
3294* [`iter::successors`]
3295* [`num::NonZeroI128`]
3296* [`num::NonZeroI16`]
3297* [`num::NonZeroI32`]
3298* [`num::NonZeroI64`]
3299* [`num::NonZeroI8`]
3300* [`num::NonZeroIsize`]
3301* [`slice::sort_by_cached_key`]
3302* [`str::escape_debug`]
3303* [`str::escape_default`]
3304* [`str::escape_unicode`]
3305* [`str::split_ascii_whitespace`]
3306
3307#### std
3308* [`Instant::checked_add`]
3309* [`Instant::checked_sub`]
3310* [`SystemTime::checked_add`]
3311* [`SystemTime::checked_sub`]
3312
3313Cargo
3314-----
3315- [You can now use alternative registries to crates.io.][cargo/6654]
3316
3317Misc
3318----
3319- [You can now use the `?` operator in your documentation tests without manually
3320 adding `fn main() -> Result<(), _> {}`.][56470]
3321
3322Compatibility Notes
3323-------------------
dc9dc135
XL
3324- [`Command::before_exec` is being replaced by the unsafe method
3325 `Command::pre_exec`][58059] and will be deprecated with Rust 1.37.0.
3326- [Use of `ATOMIC_{BOOL, ISIZE, USIZE}_INIT` is now deprecated][57425] as you
9fa01778
XL
3327 can now use `const` functions in `static` variables.
3328
3329[58370]: https://github.com/rust-lang/rust/pull/58370/
3330[58406]: https://github.com/rust-lang/rust/pull/58406/
3331[58421]: https://github.com/rust-lang/rust/pull/58421/
3332[58166]: https://github.com/rust-lang/rust/pull/58166/
3333[58044]: https://github.com/rust-lang/rust/pull/58044/
3334[58057]: https://github.com/rust-lang/rust/pull/58057/
3335[58059]: https://github.com/rust-lang/rust/pull/58059/
3336[57809]: https://github.com/rust-lang/rust/pull/57809/
3337[57873]: https://github.com/rust-lang/rust/pull/57873/
3338[57604]: https://github.com/rust-lang/rust/pull/57604/
3339[57367]: https://github.com/rust-lang/rust/pull/57367/
3340[57407]: https://github.com/rust-lang/rust/pull/57407/
3341[57425]: https://github.com/rust-lang/rust/pull/57425/
3342[57106]: https://github.com/rust-lang/rust/pull/57106/
3343[56470]: https://github.com/rust-lang/rust/pull/56470/
3344[cargo/6654]: https://github.com/rust-lang/cargo/pull/6654/
3345[`Any::type_id`]: https://doc.rust-lang.org/std/any/trait.Any.html#tymethod.type_id
3346[`Error::type_id`]: https://doc.rust-lang.org/std/error/trait.Error.html#method.type_id
3347[`atomic::AtomicI16`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI16.html
3348[`atomic::AtomicI32`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI32.html
3349[`atomic::AtomicI64`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI64.html
3350[`atomic::AtomicI8`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicI8.html
3351[`atomic::AtomicU16`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU16.html
3352[`atomic::AtomicU32`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU32.html
3353[`atomic::AtomicU64`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU64.html
3354[`atomic::AtomicU8`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU8.html
3355[`convert::Infallible`]: https://doc.rust-lang.org/std/convert/enum.Infallible.html
3356[`convert::TryFrom`]: https://doc.rust-lang.org/std/convert/trait.TryFrom.html
3357[`convert::TryInto`]: https://doc.rust-lang.org/std/convert/trait.TryInto.html
3358[`iter::from_fn`]: https://doc.rust-lang.org/std/iter/fn.from_fn.html
3359[`iter::successors`]: https://doc.rust-lang.org/std/iter/fn.successors.html
3360[`num::NonZeroI128`]: https://doc.rust-lang.org/std/num/struct.NonZeroI128.html
3361[`num::NonZeroI16`]: https://doc.rust-lang.org/std/num/struct.NonZeroI16.html
3362[`num::NonZeroI32`]: https://doc.rust-lang.org/std/num/struct.NonZeroI32.html
3363[`num::NonZeroI64`]: https://doc.rust-lang.org/std/num/struct.NonZeroI64.html
3364[`num::NonZeroI8`]: https://doc.rust-lang.org/std/num/struct.NonZeroI8.html
3365[`num::NonZeroIsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroIsize.html
3366[`slice::sort_by_cached_key`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_by_cached_key
3367[`str::escape_debug`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_debug
3368[`str::escape_default`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_default
3369[`str::escape_unicode`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_unicode
3370[`str::split_ascii_whitespace`]: https://doc.rust-lang.org/std/primitive.str.html#method.split_ascii_whitespace
3371[`Instant::checked_add`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_add
3372[`Instant::checked_sub`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_sub
3373[`SystemTime::checked_add`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_add
3374[`SystemTime::checked_sub`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_sub
3375
3376
0731742a
XL
3377Version 1.33.0 (2019-02-28)
3378==========================
3379
3380Language
3381--------
3382- [You can now use the `cfg(target_vendor)` attribute.][57465] E.g.
3383 `#[cfg(target_vendor="apple")] fn main() { println!("Hello Apple!"); }`
3384- [Integer patterns such as in a match expression can now be exhaustive.][56362]
3385 E.g. You can have match statement on a `u8` that covers `0..=255` and
3386 you would no longer be required to have a `_ => unreachable!()` case.
3387- [You can now have multiple patterns in `if let` and `while let`
3388 expressions.][57532] You can do this with the same syntax as a `match`
3389 expression. E.g.
3390 ```rust
3391 enum Creature {
3392 Crab(String),
3393 Lobster(String),
3394 Person(String),
3395 }
3396
3397 fn main() {
3398 let state = Creature::Crab("Ferris");
3399
3400 if let Creature::Crab(name) | Creature::Person(name) = state {
3401 println!("This creature's name is: {}", name);
3402 }
3403 }
3404 ```
3405- [You can now have irrefutable `if let` and `while let` patterns.][57535] Using
3406 this feature will by default produce a warning as this behaviour can be
3407 unintuitive. E.g. `if let _ = 5 {}`
3408- [You can now use `let` bindings, assignments, expression statements,
3409 and irrefutable pattern destructuring in const functions.][57175]
3410- [You can now call unsafe const functions.][57067] E.g.
3411 ```rust
3412 const unsafe fn foo() -> i32 { 5 }
3413 const fn bar() -> i32 {
3414 unsafe { foo() }
3415 }
3416 ```
3417- [You can now specify multiple attributes in a `cfg_attr` attribute.][57332]
3418 E.g. `#[cfg_attr(all(), must_use, optimize)]`
3419- [You can now specify a specific alignment with the `#[repr(packed)]`
3420 attribute.][57049] E.g. `#[repr(packed(2))] struct Foo(i16, i32);` is a struct
3421 with an alignment of 2 bytes and a size of 6 bytes.
3422- [You can now import an item from a module as an `_`.][56303] This allows you to
3423 import a trait's impls, and not have the name in the namespace. E.g.
3424 ```rust
3425 use std::io::Read as _;
3426
3427 // Allowed as there is only one `Read` in the module.
3428 pub trait Read {}
3429 ```
3430- [You may now use `Rc`, `Arc`, and `Pin` as method receivers][56805].
3431
3432Compiler
3433--------
3434- [You can now set a linker flavor for `rustc` with the `-Clinker-flavor`
3435 command line argument.][56351]
416331ca 3436- [The minimum required LLVM version has been bumped to 6.0.][56642]
0731742a
XL
3437- [Added support for the PowerPC64 architecture on FreeBSD.][57615]
3438- [The `x86_64-fortanix-unknown-sgx` target support has been upgraded to
3439 tier 2 support.][57130] Visit the [platform support][platform-support] page for
3440 information on Rust's platform support.
3441- [Added support for the `thumbv7neon-linux-androideabi` and
3442 `thumbv7neon-unknown-linux-gnueabihf` targets.][56947]
3443- [Added support for the `x86_64-unknown-uefi` target.][56769]
3444
3445Libraries
3446---------
3447- [The methods `overflowing_{add, sub, mul, shl, shr}` are now `const`
3448 functions for all numeric types.][57566]
3449- [The methods `rotate_left`, `rotate_right`, and `wrapping_{add, sub, mul, shl, shr}`
3450 are now `const` functions for all numeric types.][57105]
3451- [The methods `is_positive` and `is_negative` are now `const` functions for
3452 all signed numeric types.][57105]
3453- [The `get` method for all `NonZero` types is now `const`.][57167]
3454- [The methods `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`,
3455 `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now `const` for all
3456 numeric types.][57234]
3457- [`Ipv4Addr::new` is now a `const` function][57234]
3458
3459Stabilized APIs
3460---------------
3461- [`unix::FileExt::read_exact_at`]
3462- [`unix::FileExt::write_all_at`]
3463- [`Option::transpose`]
3464- [`Result::transpose`]
3465- [`convert::identity`]
3466- [`pin::Pin`]
3467- [`marker::Unpin`]
3468- [`marker::PhantomPinned`]
3469- [`Vec::resize_with`]
3470- [`VecDeque::resize_with`]
3471- [`Duration::as_millis`]
3472- [`Duration::as_micros`]
3473- [`Duration::as_nanos`]
3474
3475
3476Cargo
3477-----
9fa01778
XL
3478- [You can now publish crates that require a feature flag to compile with
3479 `cargo publish --features` or `cargo publish --all-features`.][cargo/6453]
0731742a
XL
3480- [Cargo should now rebuild a crate if a file was modified during the initial
3481 build.][cargo/6484]
3482
3483Compatibility Notes
3484-------------------
3485- The methods `str::{trim_left, trim_right, trim_left_matches, trim_right_matches}`
3486 are now deprecated in the standard library, and their usage will now produce a warning.
3487 Please use the `str::{trim_start, trim_end, trim_start_matches, trim_end_matches}`
3488 methods instead.
3489- The `Error::cause` method has been deprecated in favor of `Error::source` which supports
3490 downcasting.
9fa01778
XL
3491- [Libtest no longer creates a new thread for each test when
3492 `--test-threads=1`. It also runs the tests in deterministic order][56243]
0731742a
XL
3493
3494[55982]: https://github.com/rust-lang/rust/pull/55982/
9fa01778 3495[56243]: https://github.com/rust-lang/rust/pull/56243
0731742a
XL
3496[56303]: https://github.com/rust-lang/rust/pull/56303/
3497[56351]: https://github.com/rust-lang/rust/pull/56351/
3498[56362]: https://github.com/rust-lang/rust/pull/56362
3499[56642]: https://github.com/rust-lang/rust/pull/56642/
3500[56769]: https://github.com/rust-lang/rust/pull/56769/
3501[56805]: https://github.com/rust-lang/rust/pull/56805
3502[56947]: https://github.com/rust-lang/rust/pull/56947/
3503[57049]: https://github.com/rust-lang/rust/pull/57049/
3504[57067]: https://github.com/rust-lang/rust/pull/57067/
3505[57105]: https://github.com/rust-lang/rust/pull/57105
3506[57130]: https://github.com/rust-lang/rust/pull/57130/
3507[57167]: https://github.com/rust-lang/rust/pull/57167/
3508[57175]: https://github.com/rust-lang/rust/pull/57175/
3509[57234]: https://github.com/rust-lang/rust/pull/57234/
3510[57332]: https://github.com/rust-lang/rust/pull/57332/
3511[57465]: https://github.com/rust-lang/rust/pull/57465/
3512[57532]: https://github.com/rust-lang/rust/pull/57532/
3513[57535]: https://github.com/rust-lang/rust/pull/57535/
3514[57566]: https://github.com/rust-lang/rust/pull/57566/
3515[57615]: https://github.com/rust-lang/rust/pull/57615/
9fa01778 3516[cargo/6453]: https://github.com/rust-lang/cargo/pull/6453/
0731742a
XL
3517[cargo/6484]: https://github.com/rust-lang/cargo/pull/6484/
3518[`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.read_exact_at
3519[`unix::FileExt::write_all_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.write_all_at
3520[`Option::transpose`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.transpose
3521[`Result::transpose`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.transpose
3522[`convert::identity`]: https://doc.rust-lang.org/std/convert/fn.identity.html
3523[`pin::Pin`]: https://doc.rust-lang.org/std/pin/struct.Pin.html
3524[`marker::Unpin`]: https://doc.rust-lang.org/stable/std/marker/trait.Unpin.html
3525[`marker::PhantomPinned`]: https://doc.rust-lang.org/nightly/std/marker/struct.PhantomPinned.html
3526[`Vec::resize_with`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.resize_with
3527[`VecDeque::resize_with`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.resize_with
3528[`Duration::as_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_millis
3529[`Duration::as_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_micros
3530[`Duration::as_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_nanos
3531[platform-support]: https://forge.rust-lang.org/platform-support.html
3532
69743fb6
XL
3533Version 1.32.0 (2019-01-17)
3534==========================
3535
3536Language
3537--------
3538#### 2018 edition
3539- [You can now use the `?` operator in macro definitions.][56245] The `?`
3540 operator allows you to specify zero or one repetitions similar to the `*` and
3541 `+` operators.
3542- [Module paths with no leading keyword like `super`, `self`, or `crate`, will
3543 now always resolve to the item (`enum`, `struct`, etc.) available in the
3544 module if present, before resolving to a external crate or an item the prelude.][56759]
3545 E.g.
3546 ```rust
3547 enum Color { Red, Green, Blue }
3548
3549 use Color::*;
3550 ```
3551
3552#### All editions
3553- [You can now match against `PhantomData<T>` types.][55837]
3554- [You can now match against literals in macros with the `literal`
3555 specifier.][56072] This will match against a literal of any type.
3556 E.g. `1`, `'A'`, `"Hello World"`
0731742a 3557- [Self can now be used as a constructor and pattern for unit and tuple structs.][56365] E.g.
69743fb6
XL
3558 ```rust
3559 struct Point(i32, i32);
3560
3561 impl Point {
3562 pub fn new(x: i32, y: i32) -> Self {
3563 Self(x, y)
3564 }
3565
3566 pub fn is_origin(&self) -> bool {
3567 match self {
3568 Self(0, 0) => true,
3569 _ => false,
3570 }
3571 }
3572 }
3573 ```
3574- [Self can also now be used in type definitions.][56366] E.g.
3575 ```rust
3576 enum List<T>
3577 where
3578 Self: PartialOrd<Self> // can write `Self` instead of `List<T>`
3579 {
3580 Nil,
3581 Cons(T, Box<Self>) // likewise here
3582 }
3583 ```
3584- [You can now mark traits with `#[must_use]`.][55663] This provides a warning if
3585 a `impl Trait` or `dyn Trait` is returned and unused in the program.
3586
3587Compiler
3588--------
3589- [The default allocator has changed from jemalloc to the default allocator on
3590 your system.][55238] The compiler itself on Linux & macOS will still use
3591 jemalloc, but programs compiled with it will use the system allocator.
3592- [Added the `aarch64-pc-windows-msvc` target.][55702]
3593
3594Libraries
3595---------
3596- [`PathBuf` now implements `FromStr`.][55148]
3597- [`Box<[T]>` now implements `FromIterator<T>`.][55843]
3598- [The `dbg!` macro has been stabilized.][56395] This macro enables you to
3599 easily debug expressions in your rust program. E.g.
3600 ```rust
3601 let a = 2;
3602 let b = dbg!(a * 2) + 1;
3603 // ^-- prints: [src/main.rs:4] a * 2 = 4
3604 assert_eq!(b, 5);
3605 ```
3606
3607The following APIs are now `const` functions and can be used in a
3608`const` context.
3609
3610- [`Cell::as_ptr`]
3611- [`UnsafeCell::get`]
3612- [`char::is_ascii`]
3613- [`iter::empty`]
3614- [`ManuallyDrop::new`]
3615- [`ManuallyDrop::into_inner`]
3616- [`RangeInclusive::start`]
3617- [`RangeInclusive::end`]
3618- [`NonNull::as_ptr`]
3619- [`slice::as_ptr`]
3620- [`str::as_ptr`]
3621- [`Duration::as_secs`]
3622- [`Duration::subsec_millis`]
3623- [`Duration::subsec_micros`]
3624- [`Duration::subsec_nanos`]
3625- [`CStr::as_ptr`]
3626- [`Ipv4Addr::is_unspecified`]
3627- [`Ipv6Addr::new`]
3628- [`Ipv6Addr::octets`]
3629
3630Stabilized APIs
3631---------------
3632- [`i8::to_be_bytes`]
3633- [`i8::to_le_bytes`]
3634- [`i8::to_ne_bytes`]
3635- [`i8::from_be_bytes`]
3636- [`i8::from_le_bytes`]
3637- [`i8::from_ne_bytes`]
3638- [`i16::to_be_bytes`]
3639- [`i16::to_le_bytes`]
3640- [`i16::to_ne_bytes`]
3641- [`i16::from_be_bytes`]
3642- [`i16::from_le_bytes`]
3643- [`i16::from_ne_bytes`]
3644- [`i32::to_be_bytes`]
3645- [`i32::to_le_bytes`]
3646- [`i32::to_ne_bytes`]
3647- [`i32::from_be_bytes`]
3648- [`i32::from_le_bytes`]
3649- [`i32::from_ne_bytes`]
3650- [`i64::to_be_bytes`]
3651- [`i64::to_le_bytes`]
3652- [`i64::to_ne_bytes`]
3653- [`i64::from_be_bytes`]
3654- [`i64::from_le_bytes`]
3655- [`i64::from_ne_bytes`]
3656- [`i128::to_be_bytes`]
3657- [`i128::to_le_bytes`]
3658- [`i128::to_ne_bytes`]
3659- [`i128::from_be_bytes`]
3660- [`i128::from_le_bytes`]
3661- [`i128::from_ne_bytes`]
3662- [`isize::to_be_bytes`]
3663- [`isize::to_le_bytes`]
3664- [`isize::to_ne_bytes`]
3665- [`isize::from_be_bytes`]
3666- [`isize::from_le_bytes`]
3667- [`isize::from_ne_bytes`]
3668- [`u8::to_be_bytes`]
3669- [`u8::to_le_bytes`]
3670- [`u8::to_ne_bytes`]
3671- [`u8::from_be_bytes`]
3672- [`u8::from_le_bytes`]
3673- [`u8::from_ne_bytes`]
3674- [`u16::to_be_bytes`]
3675- [`u16::to_le_bytes`]
3676- [`u16::to_ne_bytes`]
3677- [`u16::from_be_bytes`]
3678- [`u16::from_le_bytes`]
3679- [`u16::from_ne_bytes`]
3680- [`u32::to_be_bytes`]
3681- [`u32::to_le_bytes`]
3682- [`u32::to_ne_bytes`]
3683- [`u32::from_be_bytes`]
3684- [`u32::from_le_bytes`]
3685- [`u32::from_ne_bytes`]
3686- [`u64::to_be_bytes`]
3687- [`u64::to_le_bytes`]
3688- [`u64::to_ne_bytes`]
3689- [`u64::from_be_bytes`]
3690- [`u64::from_le_bytes`]
3691- [`u64::from_ne_bytes`]
3692- [`u128::to_be_bytes`]
3693- [`u128::to_le_bytes`]
3694- [`u128::to_ne_bytes`]
3695- [`u128::from_be_bytes`]
3696- [`u128::from_le_bytes`]
3697- [`u128::from_ne_bytes`]
3698- [`usize::to_be_bytes`]
3699- [`usize::to_le_bytes`]
3700- [`usize::to_ne_bytes`]
3701- [`usize::from_be_bytes`]
3702- [`usize::from_le_bytes`]
3703- [`usize::from_ne_bytes`]
3704
3705Cargo
3706-----
3707- [You can now run `cargo c` as an alias for `cargo check`.][cargo/6218]
3708- [Usernames are now allowed in alt registry URLs.][cargo/6242]
3709
3710Misc
3711----
3712- [`libproc_macro` has been added to the `rust-src` distribution.][55280]
3713
3714Compatibility Notes
3715-------------------
3716- [The argument types for AVX's
3717 `_mm256_stream_si256`, `_mm256_stream_pd`, `_mm256_stream_ps`][55610] have
3718 been changed from `*const` to `*mut` as the previous implementation
3719 was unsound.
3720
3721
3722[55148]: https://github.com/rust-lang/rust/pull/55148/
3723[55238]: https://github.com/rust-lang/rust/pull/55238/
3724[55280]: https://github.com/rust-lang/rust/pull/55280/
3725[55610]: https://github.com/rust-lang/rust/pull/55610/
3726[55663]: https://github.com/rust-lang/rust/pull/55663/
3727[55702]: https://github.com/rust-lang/rust/pull/55702/
3728[55837]: https://github.com/rust-lang/rust/pull/55837/
3729[55843]: https://github.com/rust-lang/rust/pull/55843/
3730[56072]: https://github.com/rust-lang/rust/pull/56072/
3731[56245]: https://github.com/rust-lang/rust/pull/56245/
3732[56365]: https://github.com/rust-lang/rust/pull/56365/
3733[56366]: https://github.com/rust-lang/rust/pull/56366/
3734[56395]: https://github.com/rust-lang/rust/pull/56395/
3735[56759]: https://github.com/rust-lang/rust/pull/56759/
3736[cargo/6218]: https://github.com/rust-lang/cargo/pull/6218/
3737[cargo/6242]: https://github.com/rust-lang/cargo/pull/6242/
3738[`CStr::as_ptr`]: https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.as_ptr
3739[`Cell::as_ptr`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr
3740[`Duration::as_secs`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs
3741[`Duration::subsec_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_micros
3742[`Duration::subsec_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_millis
3743[`Duration::subsec_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_nanos
3744[`Ipv4Addr::is_unspecified`]: https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified
3745[`Ipv6Addr::new`]: https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.new
3746[`Ipv6Addr::octets`]: https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.octets
3747[`ManuallyDrop::into_inner`]: https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html#method.into_inner
3748[`ManuallyDrop::new`]: https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html#method.new
3749[`NonNull::as_ptr`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.as_ptr
3750[`RangeInclusive::end`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.end
3751[`RangeInclusive::start`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.start
3752[`UnsafeCell::get`]: https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html#method.get
3753[`slice::as_ptr`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr
3754[`char::is_ascii`]: https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii
3755[`i128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_be_bytes
3756[`i128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_le_bytes
3757[`i128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_ne_bytes
3758[`i128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_be_bytes
3759[`i128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_le_bytes
3760[`i128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_ne_bytes
3761[`i16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_be_bytes
3762[`i16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_le_bytes
3763[`i16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_ne_bytes
3764[`i16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_be_bytes
3765[`i16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_le_bytes
3766[`i16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_ne_bytes
3767[`i32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_be_bytes
3768[`i32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_le_bytes
3769[`i32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_ne_bytes
3770[`i32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_be_bytes
3771[`i32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_le_bytes
3772[`i32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_ne_bytes
3773[`i64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_be_bytes
3774[`i64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_le_bytes
3775[`i64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_ne_bytes
3776[`i64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_be_bytes
3777[`i64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_le_bytes
3778[`i64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_ne_bytes
3779[`i8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_be_bytes
3780[`i8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_le_bytes
3781[`i8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_ne_bytes
3782[`i8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_be_bytes
3783[`i8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_le_bytes
3784[`i8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_ne_bytes
3785[`isize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_be_bytes
3786[`isize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_le_bytes
3787[`isize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_ne_bytes
3788[`isize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_be_bytes
3789[`isize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_le_bytes
3790[`isize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_ne_bytes
3791[`iter::empty`]: https://doc.rust-lang.org/std/iter/fn.empty.html
3792[`str::as_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_ptr
3793[`u128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_be_bytes
3794[`u128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_le_bytes
3795[`u128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_ne_bytes
3796[`u128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_be_bytes
3797[`u128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_le_bytes
3798[`u128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_ne_bytes
3799[`u16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_be_bytes
3800[`u16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_le_bytes
3801[`u16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_ne_bytes
3802[`u16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_be_bytes
3803[`u16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_le_bytes
3804[`u16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_ne_bytes
3805[`u32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_be_bytes
3806[`u32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_le_bytes
3807[`u32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_ne_bytes
3808[`u32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_be_bytes
3809[`u32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_le_bytes
3810[`u32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_ne_bytes
3811[`u64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_be_bytes
3812[`u64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_le_bytes
3813[`u64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_ne_bytes
3814[`u64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_be_bytes
3815[`u64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_le_bytes
3816[`u64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_ne_bytes
3817[`u8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_be_bytes
3818[`u8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_le_bytes
3819[`u8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_ne_bytes
3820[`u8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_be_bytes
3821[`u8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_le_bytes
3822[`u8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ne_bytes
3823[`usize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_be_bytes
3824[`usize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_le_bytes
3825[`usize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_ne_bytes
3826[`usize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_be_bytes
3827[`usize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_le_bytes
3828[`usize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_ne_bytes
3829
3830
3831Version 1.31.1 (2018-12-20)
3832===========================
3833
3834- [Fix Rust failing to build on `powerpc-unknown-netbsd`][56562]
3835- [Fix broken go-to-definition in RLS][rls/1171]
3836- [Fix infinite loop on hover in RLS][rls/1170]
3837
3838[56562]: https://github.com/rust-lang/rust/pull/56562
3839[rls/1171]: https://github.com/rust-lang/rls/issues/1171
3840[rls/1170]: https://github.com/rust-lang/rls/pull/1170
3841
13cf67c4
XL
3842Version 1.31.0 (2018-12-06)
3843==========================
3844
3845Language
3846--------
0731742a 3847- 🎉 [This version marks the release of the 2018 edition of Rust.][54057] 🎉
13cf67c4
XL
3848- [New lifetime elision rules now allow for eliding lifetimes in functions and
3849 impl headers.][54778] E.g. `impl<'a> Reader for BufReader<'a> {}` can now be
3850 `impl Reader for BufReader<'_> {}`. Lifetimes are still required to be defined
3851 in structs.
3852- [You can now define and use `const` functions.][54835] These are currently
3853 a strict minimal subset of the [const fn RFC][RFC-911]. Refer to the
3854 [language reference][const-reference] for what exactly is available.
3855- [You can now use tool lints, which allow you to scope lints from external
3856 tools using attributes.][54870] E.g. `#[allow(clippy::filter_map)]`.
3857- [`#[no_mangle]` and `#[export_name]` attributes can now be located anywhere in
3858 a crate, not just in exported functions.][54451]
3859- [You can now use parentheses in pattern matches.][54497]
3860
3861Compiler
3862--------
3863- [Updated musl to 1.1.20][54430]
3864
3865Libraries
3866---------
416331ca 3867- [You can now convert `num::NonZero*` types to their raw equivalents using the
13cf67c4
XL
3868 `From` trait.][54240] E.g. `u8` now implements `From<NonZeroU8>`.
3869- [You can now convert a `&Option<T>` into `Option<&T>` and `&mut Option<T>`
3870 into `Option<&mut T>` using the `From` trait.][53218]
3871- [You can now multiply (`*`) a `time::Duration` by a `u32`.][52813]
3872
3873
3874Stabilized APIs
3875---------------
3876- [`slice::align_to`]
3877- [`slice::align_to_mut`]
3878- [`slice::chunks_exact`]
3879- [`slice::chunks_exact_mut`]
3880- [`slice::rchunks`]
3881- [`slice::rchunks_mut`]
3882- [`slice::rchunks_exact`]
3883- [`slice::rchunks_exact_mut`]
3884- [`Option::replace`]
3885
3886Cargo
3887-----
3888- [Cargo will now download crates in parallel using HTTP/2.][cargo/6005]
3889- [You can now rename packages in your Cargo.toml][cargo/6319] We have a guide
3890 on [how to use the `package` key in your dependencies.][cargo-rename-reference]
3891
3892[52813]: https://github.com/rust-lang/rust/pull/52813/
3893[53218]: https://github.com/rust-lang/rust/pull/53218/
3894[53555]: https://github.com/rust-lang/rust/issues/53555/
3895[54057]: https://github.com/rust-lang/rust/pull/54057/
3896[54240]: https://github.com/rust-lang/rust/pull/54240/
3897[54430]: https://github.com/rust-lang/rust/pull/54430/
3898[54451]: https://github.com/rust-lang/rust/pull/54451/
3899[54497]: https://github.com/rust-lang/rust/pull/54497/
3900[54778]: https://github.com/rust-lang/rust/pull/54778/
3901[54835]: https://github.com/rust-lang/rust/pull/54835/
3902[54870]: https://github.com/rust-lang/rust/pull/54870/
3903[RFC-911]: https://github.com/rust-lang/rfcs/pull/911
3904[`Option::replace`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.replace
3905[`slice::align_to_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.align_to_mut
3906[`slice::align_to`]: https://doc.rust-lang.org/std/primitive.slice.html#method.align_to
3907[`slice::chunks_exact_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.chunks_exact_mut
3908[`slice::chunks_exact`]: https://doc.rust-lang.org/std/primitive.slice.html#method.chunks_exact
3909[`slice::rchunks_exact_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks_mut
3910[`slice::rchunks_exact`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks_exact
3911[`slice::rchunks_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks_mut
3912[`slice::rchunks`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rchunks
3913[cargo/6005]: https://github.com/rust-lang/cargo/pull/6005/
3914[cargo/6319]: https://github.com/rust-lang/cargo/pull/6319/
3915[cargo-rename-reference]: https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#renaming-dependencies-in-cargotoml
3916[const-reference]: https://doc.rust-lang.org/reference/items/functions.html#const-functions
3917
3918Version 1.30.1 (2018-11-08)
3919===========================
3920
3921- [Fixed overflow ICE in rustdoc][54199]
3922- [Cap Cargo progress bar width at 60 in MSYS terminals][cargo/6122]
3923
3924[54199]: https://github.com/rust-lang/rust/pull/54199
3925[cargo/6122]: https://github.com/rust-lang/cargo/pull/6122
3926
4462d4a0
XL
3927Version 1.30.0 (2018-10-25)
3928==========================
3929
3930Language
3931--------
3932- [Procedural macros are now available.][52081] These kinds of macros allow for
3933 more powerful code generation. There is a [new chapter available][proc-macros]
3934 in the Rust Programming Language book that goes further in depth.
3935- [You can now use keywords as identifiers using the raw identifiers
3936 syntax (`r#`),][53236] e.g. `let r#for = true;`
3937- [Using anonymous parameters in traits is now deprecated with a warning and
3938 will be a hard error in the 2018 edition.][53272]
3939- [You can now use `crate` in paths.][54404] This allows you to refer to the
3940 crate root in the path, e.g. `use crate::foo;` refers to `foo` in `src/lib.rs`.
3941- [Using a external crate no longer requires being prefixed with `::`.][54404]
3942 Previously, using a external crate in a module without a use statement
3943 required `let json = ::serde_json::from_str(foo);` but can now be written
3944 as `let json = serde_json::from_str(foo);`.
3945- [You can now apply the `#[used]` attribute to static items to prevent the
3946 compiler from optimising them away, even if they appear to be unused,][51363]
3947 e.g. `#[used] static FOO: u32 = 1;`
3948- [You can now import and reexport macros from other crates with the `use`
3949 syntax.][50911] Macros exported with `#[macro_export]` are now placed into
3950 the root module of the crate. If your macro relies on calling other local
3951 macros, it is recommended to export with the
3952 `#[macro_export(local_inner_macros)]` attribute so users won't have to import
3953 those macros.
3954- [You can now catch visibility keywords (e.g. `pub`, `pub(crate)`) in macros
3955 using the `vis` specifier.][53370]
3956- [Non-macro attributes now allow all forms of literals, not just
3957 strings.][53044] Previously, you would write `#[attr("true")]`, and you can now
3958 write `#[attr(true)]`.
3959- [You can now specify a function to handle a panic in the Rust runtime with the
3960 `#[panic_handler]` attribute.][51366]
3961
3962Compiler
3963--------
3964- [Added the `riscv32imc-unknown-none-elf` target.][53822]
3965- [Added the `aarch64-unknown-netbsd` target][53165]
2a314972 3966- [Upgraded to LLVM 8.][53611]
4462d4a0
XL
3967
3968Libraries
3969---------
3970- [`ManuallyDrop` now allows the inner type to be unsized.][53033]
3971
3972Stabilized APIs
3973---------------
3974- [`Ipv4Addr::BROADCAST`]
3975- [`Ipv4Addr::LOCALHOST`]
3976- [`Ipv4Addr::UNSPECIFIED`]
3977- [`Ipv6Addr::LOCALHOST`]
3978- [`Ipv6Addr::UNSPECIFIED`]
3979- [`Iterator::find_map`]
3980
3981 The following methods are replacement methods for `trim_left`, `trim_right`,
3982 `trim_left_matches`, and `trim_right_matches`, which will be deprecated
3983 in 1.33.0:
3984- [`str::trim_end_matches`]
3985- [`str::trim_end`]
3986- [`str::trim_start_matches`]
3987- [`str::trim_start`]
3988
3989Cargo
3990----
3991- [`cargo run` doesn't require specifying a package in workspaces.][cargo/5877]
3992- [`cargo doc` now supports `--message-format=json`.][cargo/5878] This is
3993 equivalent to calling `rustdoc --error-format=json`.
4462d4a0
XL
3994- [Cargo will now provide a progress bar for builds.][cargo/5995]
3995
3996Misc
3997----
3998- [`rustdoc` allows you to specify what edition to treat your code as with the
3999 `--edition` option.][54057]
4000- [`rustdoc` now has the `--color` (specify whether to output color) and
4001 `--error-format` (specify error format, e.g. `json`) options.][53003]
4002- [We now distribute a `rust-gdbgui` script that invokes `gdbgui` with Rust
4003 debug symbols.][53774]
4004- [Attributes from Rust tools such as `rustfmt` or `clippy` are now
4005 available,][53459] e.g. `#[rustfmt::skip]` will skip formatting the next item.
4006
4007[50911]: https://github.com/rust-lang/rust/pull/50911/
4008[51363]: https://github.com/rust-lang/rust/pull/51363/
4009[51366]: https://github.com/rust-lang/rust/pull/51366/
4010[52081]: https://github.com/rust-lang/rust/pull/52081/
4011[53003]: https://github.com/rust-lang/rust/pull/53003/
4012[53033]: https://github.com/rust-lang/rust/pull/53033/
4013[53044]: https://github.com/rust-lang/rust/pull/53044/
4014[53165]: https://github.com/rust-lang/rust/pull/53165/
2a314972 4015[53611]: https://github.com/rust-lang/rust/pull/53611/
4462d4a0
XL
4016[53213]: https://github.com/rust-lang/rust/pull/53213/
4017[53236]: https://github.com/rust-lang/rust/pull/53236/
4018[53272]: https://github.com/rust-lang/rust/pull/53272/
4019[53370]: https://github.com/rust-lang/rust/pull/53370/
4020[53459]: https://github.com/rust-lang/rust/pull/53459/
4021[53774]: https://github.com/rust-lang/rust/pull/53774/
4022[53822]: https://github.com/rust-lang/rust/pull/53822/
4023[54057]: https://github.com/rust-lang/rust/pull/54057/
4024[54146]: https://github.com/rust-lang/rust/pull/54146/
4025[54404]: https://github.com/rust-lang/rust/pull/54404/
4026[cargo/5877]: https://github.com/rust-lang/cargo/pull/5877/
4027[cargo/5878]: https://github.com/rust-lang/cargo/pull/5878/
4462d4a0 4028[cargo/5995]: https://github.com/rust-lang/cargo/pull/5995/
a1dfa0c6 4029[proc-macros]: https://doc.rust-lang.org/nightly/book/2018-edition/ch19-06-macros.html
4462d4a0
XL
4030
4031[`Ipv4Addr::BROADCAST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.BROADCAST
4032[`Ipv4Addr::LOCALHOST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.LOCALHOST
4033[`Ipv4Addr::UNSPECIFIED`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.UNSPECIFIED
4034[`Ipv6Addr::LOCALHOST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#associatedconstant.LOCALHOST
4035[`Ipv6Addr::UNSPECIFIED`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#associatedconstant.UNSPECIFIED
4036[`Iterator::find_map`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.find_map
4037[`str::trim_end_matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_end_matches
4038[`str::trim_end`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_end
4039[`str::trim_start_matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_start_matches
4040[`str::trim_start`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_start
4041
4042
4043Version 1.29.2 (2018-10-11)
4044===========================
4045
4046- [Workaround for an aliasing-related LLVM bug, which caused miscompilation.][54639]
4047- The `rls-preview` component on the windows-gnu targets has been restored.
4048
4049[54639]: https://github.com/rust-lang/rust/pull/54639
4050
4051
4052Version 1.29.1 (2018-09-25)
4053===========================
4054
4055Security Notes
4056--------------
4057
4058- The standard library's `str::repeat` function contained an out of bounds write
4059 caused by an integer overflow. This has been fixed by deterministically
4060 panicking when an overflow happens.
4061
416331ca 4062 Thank you to Scott McMurray for responsibly disclosing this vulnerability to
4462d4a0
XL
4063 us.
4064
4065
8faf50e0
XL
4066Version 1.29.0 (2018-09-13)
4067==========================
4068
4069Compiler
4070--------
4071- [Bumped minimum LLVM version to 5.0.][51899]
4072- [Added `powerpc64le-unknown-linux-musl` target.][51619]
4073- [Added `aarch64-unknown-hermit` and `x86_64-unknown-hermit` targets.][52861]
2a314972 4074- [Upgraded to LLVM 7.][51966]
8faf50e0
XL
4075
4076Libraries
4077---------
4462d4a0 4078- [`Once::call_once` no longer requires `Once` to be `'static`.][52239]
8faf50e0
XL
4079- [`BuildHasherDefault` now implements `PartialEq` and `Eq`.][52402]
4080- [`Box<CStr>`, `Box<OsStr>`, and `Box<Path>` now implement `Clone`.][51912]
4081- [Implemented `PartialEq<&str>` for `OsString` and `PartialEq<OsString>`
4082 for `&str`.][51178]
4083- [`Cell<T>` now allows `T` to be unsized.][50494]
4084- [`SocketAddr` is now stable on Redox.][52656]
4085
4086Stabilized APIs
4087---------------
4088- [`Arc::downcast`]
4089- [`Iterator::flatten`]
4090- [`Rc::downcast`]
4091
4092Cargo
4093-----
4462d4a0
XL
4094- [Cargo can silently fix some bad lockfiles.][cargo/5831] You can use
4095 `--locked` to disable this behavior.
8faf50e0 4096- [`cargo-install` will now allow you to cross compile an install
4462d4a0 4097 using `--target`.][cargo/5614]
8faf50e0
XL
4098- [Added the `cargo-fix` subcommand to automatically move project code from
4099 2015 edition to 2018.][cargo/5723]
b7449926
XL
4100- [`cargo doc` can now optionally document private types using the
4101 `--document-private-items` flag.][cargo/5543]
8faf50e0
XL
4102
4103Misc
4104----
4105- [`rustdoc` now has the `--cap-lints` option which demotes all lints above
4106 the specified level to that level.][52354] For example `--cap-lints warn`
4107 will demote `deny` and `forbid` lints to `warn`.
4108- [`rustc` and `rustdoc` will now have the exit code of `1` if compilation
4462d4a0 4109 fails and `101` if there is a panic.][52197]
8faf50e0 4110- [A preview of clippy has been made available through rustup.][51122]
4462d4a0 4111 You can install the preview with `rustup component add clippy-preview`.
8faf50e0
XL
4112
4113Compatibility Notes
4114-------------------
4115- [`str::{slice_unchecked, slice_unchecked_mut}` are now deprecated.][51807]
4116 Use `str::get_unchecked(begin..end)` instead.
4462d4a0 4117- [`std::env::home_dir` is now deprecated for its unintuitive behavior.][51656]
8faf50e0
XL
4118 Consider using the `home_dir` function from
4119 https://crates.io/crates/dirs instead.
4120- [`rustc` will no longer silently ignore invalid data in target spec.][52330]
4462d4a0
XL
4121- [`cfg` attributes and `--cfg` command line flags are now more
4122 strictly validated.][53893]
8faf50e0 4123
4462d4a0 4124[53893]: https://github.com/rust-lang/rust/pull/53893/
8faf50e0 4125[52861]: https://github.com/rust-lang/rust/pull/52861/
2a314972 4126[51966]: https://github.com/rust-lang/rust/pull/51966/
8faf50e0
XL
4127[52656]: https://github.com/rust-lang/rust/pull/52656/
4128[52239]: https://github.com/rust-lang/rust/pull/52239/
4129[52330]: https://github.com/rust-lang/rust/pull/52330/
4130[52354]: https://github.com/rust-lang/rust/pull/52354/
4131[52402]: https://github.com/rust-lang/rust/pull/52402/
4132[52103]: https://github.com/rust-lang/rust/pull/52103/
4133[52197]: https://github.com/rust-lang/rust/pull/52197/
4134[51807]: https://github.com/rust-lang/rust/pull/51807/
4135[51899]: https://github.com/rust-lang/rust/pull/51899/
4136[51912]: https://github.com/rust-lang/rust/pull/51912/
4137[51511]: https://github.com/rust-lang/rust/pull/51511/
4138[51619]: https://github.com/rust-lang/rust/pull/51619/
4139[51656]: https://github.com/rust-lang/rust/pull/51656/
4140[51178]: https://github.com/rust-lang/rust/pull/51178/
4141[51122]: https://github.com/rust-lang/rust/pull/51122
4142[50494]: https://github.com/rust-lang/rust/pull/50494/
b7449926 4143[cargo/5543]: https://github.com/rust-lang/cargo/pull/5543
8faf50e0
XL
4144[cargo/5614]: https://github.com/rust-lang/cargo/pull/5614/
4145[cargo/5723]: https://github.com/rust-lang/cargo/pull/5723/
4146[cargo/5831]: https://github.com/rust-lang/cargo/pull/5831/
4147[`Arc::downcast`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.downcast
4148[`Iterator::flatten`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.flatten
4149[`Rc::downcast`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.downcast
4150
4151
94b46f34 4152Version 1.28.0 (2018-08-02)
5d61e2ac
XL
4153===========================
4154
94b46f34
XL
4155Language
4156--------
4157- [The `#[repr(transparent)]` attribute is now stable.][51562] This attribute
4158 allows a Rust newtype wrapper (`struct NewType<T>(T);`) to be represented as
4159 the inner type across Foreign Function Interface (FFI) boundaries.
4160- [The keywords `pure`, `sizeof`, `alignof`, and `offsetof` have been unreserved
4161 and can now be used as identifiers.][51196]
4162- [The `GlobalAlloc` trait and `#[global_allocator]` attribute are now
4163 stable.][51241] This will allow users to specify a global allocator for
4164 their program.
4165- [Unit test functions marked with the `#[test]` attribute can now return
4166 `Result<(), E: Debug>` in addition to `()`.][51298]
4167- [The `lifetime` specifier for `macro_rules!` is now stable.][50385] This
4168 allows macros to easily target lifetimes.
4169
4170Compiler
4171--------
4172- [The `s` and `z` optimisation levels are now stable.][50265] These optimisations
4173 prioritise making smaller binary sizes. `z` is the same as `s` with the
4174 exception that it does not vectorise loops, which typically results in an even
4175 smaller binary.
4176- [The short error format is now stable.][49546] Specified with
4177 `--error-format=short` this option will provide a more compressed output of
4178 rust error messages.
4179- [Added a lint warning when you have duplicated `macro_export`s.][50143]
4180- [Reduced the number of allocations in the macro parser.][50855] This can
4181 improve compile times of macro heavy crates on average by 5%.
4182
4183Libraries
4184---------
4185- [Implemented `Default` for `&mut str`.][51306]
4186- [Implemented `From<bool>` for all integer and unsigned number types.][50554]
4187- [Implemented `Extend` for `()`.][50234]
4188- [The `Debug` implementation of `time::Duration` should now be more easily
4189 human readable.][50364] Previously a `Duration` of one second would printed as
4190 `Duration { secs: 1, nanos: 0 }` and will now be printed as `1s`.
4191- [Implemented `From<&String>` for `Cow<str>`, `From<&Vec<T>>` for `Cow<[T]>`,
4192 `From<Cow<CStr>>` for `CString`, `From<CString>, From<CStr>, From<&CString>`
4193 for `Cow<CStr>`, `From<OsString>, From<OsStr>, From<&OsString>` for
4194 `Cow<OsStr>`, `From<&PathBuf>` for `Cow<Path>`, and `From<Cow<Path>>`
4195 for `PathBuf`.][50170]
4196- [Implemented `Shl` and `Shr` for `Wrapping<u128>`
4197 and `Wrapping<i128>`.][50465]
4198- [`DirEntry::metadata` now uses `fstatat` instead of `lstat` when
4199 possible.][51050] This can provide up to a 40% speed increase.
4200- [Improved error messages when using `format!`.][50610]
4201
4202Stabilized APIs
4203---------------
4204- [`Iterator::step_by`]
4205- [`Path::ancestors`]
74d20737
XL
4206- [`SystemTime::UNIX_EPOCH`]
4207- [`alloc::GlobalAlloc`]
4208- [`alloc::Layout`]
4209- [`alloc::LayoutErr`]
4210- [`alloc::System`]
4211- [`alloc::alloc`]
4212- [`alloc::alloc_zeroed`]
4213- [`alloc::dealloc`]
4214- [`alloc::realloc`]
4215- [`alloc::handle_alloc_error`]
94b46f34
XL
4216- [`btree_map::Entry::or_default`]
4217- [`fmt::Alignment`]
4218- [`hash_map::Entry::or_default`]
4219- [`iter::repeat_with`]
4220- [`num::NonZeroUsize`]
4221- [`num::NonZeroU128`]
4222- [`num::NonZeroU16`]
4223- [`num::NonZeroU32`]
4224- [`num::NonZeroU64`]
4225- [`num::NonZeroU8`]
4226- [`ops::RangeBounds`]
4227- [`slice::SliceIndex`]
4228- [`slice::from_mut`]
4229- [`slice::from_ref`]
4230- [`{Any + Send + Sync}::downcast_mut`]
4231- [`{Any + Send + Sync}::downcast_ref`]
4232- [`{Any + Send + Sync}::is`]
4233
4234Cargo
4235-----
4236- [Cargo will now no longer allow you to publish crates with build scripts that
4237 modify the `src` directory.][cargo/5584] The `src` directory in a crate should be
4238 considered to be immutable.
4239
4240Misc
4241----
4242- [The `suggestion_applicability` field in `rustc`'s json output is now
4243 stable.][50486] This will allow dev tools to check whether a code suggestion
4244 would apply to them.
4245
5d61e2ac
XL
4246Compatibility Notes
4247-------------------
8faf50e0
XL
4248- [Rust will consider trait objects with duplicated constraints to be the same
4249 type as without the duplicated constraint.][51276] For example the below code will
4250 now fail to compile.
94b46f34
XL
4251 ```rust
4252 trait Trait {}
4253
4254 impl Trait + Send {
4255 fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test`
4256 }
5d61e2ac 4257
94b46f34
XL
4258 impl Trait + Send + Send {
4259 fn test(&self) { println!("two"); }
4260 }
4261 ```
5d61e2ac 4262
94b46f34
XL
4263[49546]: https://github.com/rust-lang/rust/pull/49546/
4264[50143]: https://github.com/rust-lang/rust/pull/50143/
4265[50170]: https://github.com/rust-lang/rust/pull/50170/
4266[50234]: https://github.com/rust-lang/rust/pull/50234/
4267[50265]: https://github.com/rust-lang/rust/pull/50265/
4268[50364]: https://github.com/rust-lang/rust/pull/50364/
4269[50385]: https://github.com/rust-lang/rust/pull/50385/
4270[50465]: https://github.com/rust-lang/rust/pull/50465/
4271[50486]: https://github.com/rust-lang/rust/pull/50486/
4272[50554]: https://github.com/rust-lang/rust/pull/50554/
4273[50610]: https://github.com/rust-lang/rust/pull/50610/
4274[50855]: https://github.com/rust-lang/rust/pull/50855/
4275[51050]: https://github.com/rust-lang/rust/pull/51050/
4276[51196]: https://github.com/rust-lang/rust/pull/51196/
4277[51200]: https://github.com/rust-lang/rust/pull/51200/
4278[51241]: https://github.com/rust-lang/rust/pull/51241/
4279[51276]: https://github.com/rust-lang/rust/pull/51276/
4280[51298]: https://github.com/rust-lang/rust/pull/51298/
4281[51306]: https://github.com/rust-lang/rust/pull/51306/
4282[51562]: https://github.com/rust-lang/rust/pull/51562/
4283[cargo/5584]: https://github.com/rust-lang/cargo/pull/5584/
4284[`Iterator::step_by`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.step_by
4285[`Path::ancestors`]: https://doc.rust-lang.org/std/path/struct.Path.html#method.ancestors
74d20737
XL
4286[`SystemTime::UNIX_EPOCH`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#associatedconstant.UNIX_EPOCH
4287[`alloc::GlobalAlloc`]: https://doc.rust-lang.org/std/alloc/trait.GlobalAlloc.html
4288[`alloc::Layout`]: https://doc.rust-lang.org/std/alloc/struct.Layout.html
4289[`alloc::LayoutErr`]: https://doc.rust-lang.org/std/alloc/struct.LayoutErr.html
4290[`alloc::System`]: https://doc.rust-lang.org/std/alloc/struct.System.html
4291[`alloc::alloc`]: https://doc.rust-lang.org/std/alloc/fn.alloc.html
4292[`alloc::alloc_zeroed`]: https://doc.rust-lang.org/std/alloc/fn.alloc_zeroed.html
4293[`alloc::dealloc`]: https://doc.rust-lang.org/std/alloc/fn.dealloc.html
4294[`alloc::realloc`]: https://doc.rust-lang.org/std/alloc/fn.realloc.html
4295[`alloc::handle_alloc_error`]: https://doc.rust-lang.org/std/alloc/fn.handle_alloc_error.html
94b46f34
XL
4296[`btree_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.or_default
4297[`fmt::Alignment`]: https://doc.rust-lang.org/std/fmt/enum.Alignment.html
8faf50e0 4298[`hash_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/hash_map/enum.Entry.html#method.or_default
94b46f34
XL
4299[`iter::repeat_with`]: https://doc.rust-lang.org/std/iter/fn.repeat_with.html
4300[`num::NonZeroUsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroUsize.html
4301[`num::NonZeroU128`]: https://doc.rust-lang.org/std/num/struct.NonZeroU128.html
4302[`num::NonZeroU16`]: https://doc.rust-lang.org/std/num/struct.NonZeroU16.html
4303[`num::NonZeroU32`]: https://doc.rust-lang.org/std/num/struct.NonZeroU32.html
4304[`num::NonZeroU64`]: https://doc.rust-lang.org/std/num/struct.NonZeroU64.html
4305[`num::NonZeroU8`]: https://doc.rust-lang.org/std/num/struct.NonZeroU8.html
4306[`ops::RangeBounds`]: https://doc.rust-lang.org/std/ops/trait.RangeBounds.html
4307[`slice::SliceIndex`]: https://doc.rust-lang.org/std/slice/trait.SliceIndex.html
4308[`slice::from_mut`]: https://doc.rust-lang.org/std/slice/fn.from_mut.html
4309[`slice::from_ref`]: https://doc.rust-lang.org/std/slice/fn.from_ref.html
4310[`{Any + Send + Sync}::downcast_mut`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_mut-2
4311[`{Any + Send + Sync}::downcast_ref`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref-2
4312[`{Any + Send + Sync}::is`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.is-2
5d61e2ac 4313
8faf50e0
XL
4314Version 1.27.2 (2018-07-20)
4315===========================
4316
4317Compatibility Notes
4318-------------------
4319
4320- The borrow checker was fixed to avoid potential unsoundness when using
4321 match ergonomics: [#52213][52213].
4322
4323[52213]: https://github.com/rust-lang/rust/issues/52213
4324
83c7162d
XL
4325Version 1.27.1 (2018-07-10)
4326===========================
4327
4328Security Notes
4329--------------
4330
4331- rustdoc would execute plugins in the /tmp/rustdoc/plugins directory
4332 when running, which enabled executing code as some other user on a
4333 given machine. This release fixes that vulnerability; you can read
94b46f34 4334 more about this on the [blog][rustdoc-sec]. The associated CVE is [CVE-2018-1000622].
83c7162d 4335
416331ca 4336 Thank you to Red Hat for responsibly disclosing this vulnerability to us.
83c7162d
XL
4337
4338Compatibility Notes
4339-------------------
4340
4341- The borrow checker was fixed to avoid an additional potential unsoundness when using
4342 match ergonomics: [#51415][51415], [#49534][49534].
4343
4344[51415]: https://github.com/rust-lang/rust/issues/51415
4345[49534]: https://github.com/rust-lang/rust/issues/49534
4346[rustdoc-sec]: https://blog.rust-lang.org/2018/07/06/security-advisory-for-rustdoc.html
94b46f34 4347[CVE-2018-1000622]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=%20CVE-2018-1000622
83c7162d
XL
4348
4349Version 1.27.0 (2018-06-21)
4350==========================
4351
4352Language
4353--------
4354- [Removed 'proc' from the reserved keywords list.][49699] This allows `proc` to
8faf50e0 4355 be used as an identifier.
83c7162d
XL
4356- [The dyn syntax is now available.][49968] This syntax is equivalent to the
4357 bare `Trait` syntax, and should make it clearer when being used in tandem with
4462d4a0 4358 `impl Trait` because it is equivalent to the following syntax:
83c7162d
XL
4359 `&Trait == &dyn Trait`, `&mut Trait == &mut dyn Trait`, and
4360 `Box<Trait> == Box<dyn Trait>`.
4361- [Attributes on generic parameters such as types and lifetimes are
4362 now stable.][48851] e.g.
4363 `fn foo<#[lifetime_attr] 'a, #[type_attr] T: 'a>() {}`
4364- [The `#[must_use]` attribute can now also be used on functions as well as
4365 types.][48925] It provides a lint that by default warns users when the
4366 value returned by a function has not been used.
4367
4368Compiler
4369--------
b7449926 4370- [Added the `armv5te-unknown-linux-musleabi` target.][50423]
83c7162d
XL
4371
4372Libraries
4373---------
4374- [SIMD (Single Instruction Multiple Data) on x86/x86_64 is now stable.][49664]
4375 This includes [`arch::x86`] & [`arch::x86_64`] modules which contain
4376 SIMD intrinsics, a new macro called `is_x86_feature_detected!`, the
4377 `#[target_feature(enable="")]` attribute, and adding `target_feature = ""` to
4378 the `cfg` attribute.
4379- [A lot of methods for `[u8]`, `f32`, and `f64` previously only available in
4380 std are now available in core.][49896]
4381- [The generic `Rhs` type parameter on `ops::{Shl, ShlAssign, Shr}` now defaults
4382 to `Self`.][49630]
4383- [`std::str::replace` now has the `#[must_use]` attribute][50177] to clarify
4384 that the operation isn't done in place.
4385- [`Clone::clone`, `Iterator::collect`, and `ToOwned::to_owned` now have
4386 the `#[must_use]` attribute][49533] to warn about unused potentially
4387 expensive allocations.
4388
4389Stabilized APIs
4390---------------
4391- [`DoubleEndedIterator::rfind`]
4392- [`DoubleEndedIterator::rfold`]
4393- [`DoubleEndedIterator::try_rfold`]
4394- [`Duration::from_micros`]
4395- [`Duration::from_nanos`]
4396- [`Duration::subsec_micros`]
4397- [`Duration::subsec_millis`]
4398- [`HashMap::remove_entry`]
4399- [`Iterator::try_fold`]
4400- [`Iterator::try_for_each`]
4401- [`NonNull::cast`]
4402- [`Option::filter`]
4403- [`String::replace_range`]
4404- [`Take::set_limit`]
4405- [`hint::unreachable_unchecked`]
4406- [`os::unix::process::parent_id`]
83c7162d
XL
4407- [`ptr::swap_nonoverlapping`]
4408- [`slice::rsplit_mut`]
4409- [`slice::rsplit`]
4410- [`slice::swap_with_slice`]
4411
4412Cargo
4413-----
4414- [`cargo-metadata` now includes `authors`, `categories`, `keywords`,
4415 `readme`, and `repository` fields.][cargo/5386]
94b46f34 4416- [`cargo-metadata` now includes a package's `metadata` table.][cargo/5360]
83c7162d
XL
4417- [Added the `--target-dir` optional argument.][cargo/5393] This allows you to specify
4418 a different directory than `target` for placing compilation artifacts.
4419- [Cargo will be adding automatic target inference for binaries, benchmarks,
4420 examples, and tests in the Rust 2018 edition.][cargo/5335] If your project specifies
4462d4a0 4421 specific targets, e.g. using `[[bin]]`, and have other binaries in locations
83c7162d 4422 where cargo would infer a binary, Cargo will produce a warning. You can
4462d4a0
XL
4423 disable this feature ahead of time by setting any of the following to false:
4424 `autobins`, `autobenches`, `autoexamples`, `autotests`.
83c7162d
XL
4425- [Cargo will now cache compiler information.][cargo/5359] This can be disabled by
4426 setting `CARGO_CACHE_RUSTC_INFO=0` in your environment.
4427
4428Misc
4429----
4430- [Added “The Rustc book” into the official documentation.][49707]
4431 [“The Rustc book”] documents and teaches how to use the rustc compiler.
4432- [All books available on `doc.rust-lang.org` are now searchable.][49623]
4433
4434Compatibility Notes
4435-------------------
4436- [Calling a `CharExt` or `StrExt` method directly on core will no longer
4437 work.][49896] e.g. `::core::prelude::v1::StrExt::is_empty("")` will not
4438 compile, `"".is_empty()` will still compile.
4439- [`Debug` output on `atomic::{AtomicBool, AtomicIsize, AtomicPtr, AtomicUsize}`
4462d4a0
XL
4440 will only print the inner type.][48553] E.g.
4441 `print!("{:?}", AtomicBool::new(true))` will print `true`,
83c7162d
XL
4442 not `AtomicBool(true)`.
4443- [The maximum number for `repr(align(N))` is now 2²⁹.][50378] Previously you
4444 could enter higher numbers but they were not supported by LLVM. Up to 512MB
4445 alignment should cover all use cases.
b7449926
XL
4446- The `.description()` method on the `std::error::Error` trait
4447 [has been soft-deprecated][50163]. It is no longer required to implement it.
83c7162d
XL
4448
4449[48553]: https://github.com/rust-lang/rust/pull/48553/
4450[48851]: https://github.com/rust-lang/rust/pull/48851/
4451[48925]: https://github.com/rust-lang/rust/pull/48925/
4452[49533]: https://github.com/rust-lang/rust/pull/49533/
4453[49623]: https://github.com/rust-lang/rust/pull/49623/
4454[49630]: https://github.com/rust-lang/rust/pull/49630/
4455[49664]: https://github.com/rust-lang/rust/pull/49664/
4456[49699]: https://github.com/rust-lang/rust/pull/49699/
4457[49707]: https://github.com/rust-lang/rust/pull/49707/
4458[49719]: https://github.com/rust-lang/rust/pull/49719/
4459[49896]: https://github.com/rust-lang/rust/pull/49896/
4460[49968]: https://github.com/rust-lang/rust/pull/49968/
b7449926 4461[50163]: https://github.com/rust-lang/rust/pull/50163
83c7162d
XL
4462[50177]: https://github.com/rust-lang/rust/pull/50177/
4463[50378]: https://github.com/rust-lang/rust/pull/50378/
4464[50398]: https://github.com/rust-lang/rust/pull/50398/
4465[50423]: https://github.com/rust-lang/rust/pull/50423/
4466[cargo/5203]: https://github.com/rust-lang/cargo/pull/5203/
4467[cargo/5335]: https://github.com/rust-lang/cargo/pull/5335/
4468[cargo/5359]: https://github.com/rust-lang/cargo/pull/5359/
94b46f34 4469[cargo/5360]: https://github.com/rust-lang/cargo/pull/5360/
83c7162d
XL
4470[cargo/5386]: https://github.com/rust-lang/cargo/pull/5386/
4471[cargo/5393]: https://github.com/rust-lang/cargo/pull/5393/
4472[`DoubleEndedIterator::rfind`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.rfind
4473[`DoubleEndedIterator::rfold`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.rfold
4474[`DoubleEndedIterator::try_rfold`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.try_rfold
4475[`Duration::from_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_micros
4476[`Duration::from_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_nanos
4477[`Duration::subsec_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_micros
4478[`Duration::subsec_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_millis
4479[`HashMap::remove_entry`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.remove_entry
4480[`Iterator::try_fold`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.try_fold
4481[`Iterator::try_for_each`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.try_for_each
4482[`NonNull::cast`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.cast
4483[`Option::filter`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.filter
4484[`String::replace_range`]: https://doc.rust-lang.org/std/string/struct.String.html#method.replace_range
4485[`Take::set_limit`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.set_limit
94b46f34
XL
4486[`hint::unreachable_unchecked`]: https://doc.rust-lang.org/std/hint/fn.unreachable_unchecked.html
4487[`os::unix::process::parent_id`]: https://doc.rust-lang.org/std/os/unix/process/fn.parent_id.html
4488[`process::id`]: https://doc.rust-lang.org/std/process/fn.id.html
4489[`ptr::swap_nonoverlapping`]: https://doc.rust-lang.org/std/ptr/fn.swap_nonoverlapping.html
83c7162d
XL
4490[`slice::rsplit_mut`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rsplit_mut
4491[`slice::rsplit`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rsplit
4492[`slice::swap_with_slice`]: https://doc.rust-lang.org/std/primitive.slice.html#method.swap_with_slice
4493[`arch::x86_64`]: https://doc.rust-lang.org/std/arch/x86_64/index.html
4494[`arch::x86`]: https://doc.rust-lang.org/std/arch/x86/index.html
83c7162d
XL
4495[“The Rustc book”]: https://doc.rust-lang.org/rustc
4496
4497
2c912e08
XL
4498Version 1.26.2 (2018-06-05)
4499==========================
4500
4501Compatibility Notes
4502-------------------
4503
4462d4a0 4504- [The borrow checker was fixed to avoid unsoundness when using match ergonomics.][51117]
2c912e08
XL
4505
4506[51117]: https://github.com/rust-lang/rust/issues/51117
4507
83c7162d 4508
564c78a2
XL
4509Version 1.26.1 (2018-05-29)
4510==========================
4511
4512Tools
4513-----
4514
4462d4a0
XL
4515- [RLS now works on Windows.][50646]
4516- [Rustfmt stopped badly formatting text in some cases.][rustfmt/2695]
564c78a2 4517
94b46f34 4518
564c78a2
XL
4519Compatibility Notes
4520--------
4521
4522- [`fn main() -> impl Trait` no longer works for non-Termination
4462d4a0 4523 trait.][50656]
564c78a2 4524 This reverts an accidental stabilization.
4462d4a0
XL
4525- [`NaN > NaN` no longer returns true in const-fn contexts.][50812]
4526- [Prohibit using turbofish for `impl Trait` in method arguments.][50950]
564c78a2
XL
4527
4528[50646]: https://github.com/rust-lang/rust/issues/50646
4529[50656]: https://github.com/rust-lang/rust/pull/50656
4530[50812]: https://github.com/rust-lang/rust/pull/50812
4531[50950]: https://github.com/rust-lang/rust/issues/50950
4532[rustfmt/2695]: https://github.com/rust-lang-nursery/rustfmt/issues/2695
4533
4534Version 1.26.0 (2018-05-10)
4535==========================
4536
4537Language
4538--------
4539- [Closures now implement `Copy` and/or `Clone` if all captured variables
4540 implement either or both traits.][49299]
4541- [The inclusive range syntax e.g. `for x in 0..=10` is now stable.][47813]
4462d4a0 4542- [The `'_` lifetime is now stable. The underscore lifetime can be used anywhere a
564c78a2
XL
4543 lifetime can be elided.][49458]
4544- [`impl Trait` is now stable allowing you to have abstract types in returns
4462d4a0 4545 or in function parameters.][49255] E.g. `fn foo() -> impl Iterator<Item=u8>` or
564c78a2
XL
4546 `fn open(path: impl AsRef<Path>)`.
4547- [Pattern matching will now automatically apply dereferences.][49394]
4548- [128-bit integers in the form of `u128` and `i128` are now stable.][49101]
4549- [`main` can now return `Result<(), E: Debug>`][49162] in addition to `()`.
4550- [A lot of operations are now available in a const context.][46882] E.g. You
4551 can now index into constant arrays, reference and dereference into constants,
4462d4a0
XL
4552 and use tuple struct constructors.
4553- [Fixed entry slice patterns are now stable.][48516] E.g.
564c78a2
XL
4554 ```rust
4555 let points = [1, 2, 3, 4];
4556 match points {
4557 [1, 2, 3, 4] => println!("All points were sequential."),
4558 _ => println!("Not all points were sequential."),
4559 }
4560 ```
4561
4562
4563Compiler
4564--------
4565- [LLD is now used as the default linker for `wasm32-unknown-unknown`.][48125]
4566- [Fixed exponential projection complexity on nested types.][48296]
4567 This can provide up to a ~12% reduction in compile times for certain crates.
4568- [Added the `--remap-path-prefix` option to rustc.][48359] Allowing you
4569 to remap path prefixes outputted by the compiler.
4570- [Added `powerpc-unknown-netbsd` target.][48281]
4571
4572Libraries
4573---------
4574- [Implemented `From<u16> for usize` & `From<{u8, i16}> for isize`.][49305]
4575- [Added hexadecimal formatting for integers with fmt::Debug][48978]
4576 e.g. `assert!(format!("{:02x?}", b"Foo\0") == "[46, 6f, 6f, 00]")`
4577- [Implemented `Default, Hash` for `cmp::Reverse`.][48628]
4578- [Optimized `str::repeat` being 8x faster in large cases.][48657]
4579- [`ascii::escape_default` is now available in libcore.][48735]
4580- [Trailing commas are now supported in std and core macros.][48056]
4581- [Implemented `Copy, Clone` for `cmp::Reverse`][47379]
4582- [Implemented `Clone` for `char::{ToLowercase, ToUppercase}`.][48629]
4583
4584Stabilized APIs
4585---------------
4586- [`*const T::add`]
4587- [`*const T::copy_to_nonoverlapping`]
4588- [`*const T::copy_to`]
4589- [`*const T::read_unaligned`]
4590- [`*const T::read_volatile`]
4591- [`*const T::read`]
4592- [`*const T::sub`]
4593- [`*const T::wrapping_add`]
4594- [`*const T::wrapping_sub`]
4595- [`*mut T::add`]
4596- [`*mut T::copy_to_nonoverlapping`]
4597- [`*mut T::copy_to`]
4598- [`*mut T::read_unaligned`]
4599- [`*mut T::read_volatile`]
4600- [`*mut T::read`]
4601- [`*mut T::replace`]
4602- [`*mut T::sub`]
4603- [`*mut T::swap`]
4604- [`*mut T::wrapping_add`]
4605- [`*mut T::wrapping_sub`]
4606- [`*mut T::write_bytes`]
4607- [`*mut T::write_unaligned`]
4608- [`*mut T::write_volatile`]
4609- [`*mut T::write`]
4610- [`Box::leak`]
4611- [`FromUtf8Error::as_bytes`]
4612- [`LocalKey::try_with`]
4613- [`Option::cloned`]
4614- [`btree_map::Entry::and_modify`]
4615- [`fs::read_to_string`]
4616- [`fs::read`]
4617- [`fs::write`]
4618- [`hash_map::Entry::and_modify`]
4619- [`iter::FusedIterator`]
4620- [`ops::RangeInclusive`]
4621- [`ops::RangeToInclusive`]
4622- [`process::id`]
4623- [`slice::rotate_left`]
4624- [`slice::rotate_right`]
4625- [`String::retain`]
4626
4627
4628Cargo
4629-----
4630- [Cargo will now output path to custom commands when `-v` is
4631 passed with `--list`][cargo/5041]
4632- [The Cargo binary version is now the same as the Rust version][cargo/5083]
564c78a2
XL
4633
4634Misc
4635----
4636- [The second edition of "The Rust Programming Language" book is now recommended
4637 over the first.][48404]
4638
4639Compatibility Notes
4640-------------------
4641
4642- [aliasing a `Fn` trait as `dyn` no longer works.][48481] E.g. the following
4643 syntax is now invalid.
4644 ```
4645 use std::ops::Fn as dyn;
4646 fn g(_: Box<dyn(std::fmt::Debug)>) {}
4647 ```
4648- [The result of dereferences are no longer promoted to `'static`.][47408]
4649 e.g.
4650 ```rust
4651 fn main() {
4652 const PAIR: &(i32, i32) = &(0, 1);
4653 let _reversed_pair: &'static _ = &(PAIR.1, PAIR.0); // Doesn't work
4654 }
4655 ```
4656- [Deprecate `AsciiExt` trait in favor of inherent methods.][49109]
4657- [`".e0"` will now no longer parse as `0.0` and will instead cause
4658 an error.][48235]
4659- [Removed hoedown from rustdoc.][48274]
4660- [Bounds on higher-kinded lifetimes a hard error.][48326]
4661
4662[46882]: https://github.com/rust-lang/rust/pull/46882
4663[47379]: https://github.com/rust-lang/rust/pull/47379
4664[47408]: https://github.com/rust-lang/rust/pull/47408
4665[47813]: https://github.com/rust-lang/rust/pull/47813
4666[48056]: https://github.com/rust-lang/rust/pull/48056
4667[48125]: https://github.com/rust-lang/rust/pull/48125
4668[48166]: https://github.com/rust-lang/rust/pull/48166
4669[48235]: https://github.com/rust-lang/rust/pull/48235
4670[48274]: https://github.com/rust-lang/rust/pull/48274
4671[48281]: https://github.com/rust-lang/rust/pull/48281
4672[48296]: https://github.com/rust-lang/rust/pull/48296
4673[48326]: https://github.com/rust-lang/rust/pull/48326
4674[48359]: https://github.com/rust-lang/rust/pull/48359
4675[48404]: https://github.com/rust-lang/rust/pull/48404
4676[48481]: https://github.com/rust-lang/rust/pull/48481
4677[48516]: https://github.com/rust-lang/rust/pull/48516
4678[48628]: https://github.com/rust-lang/rust/pull/48628
4679[48629]: https://github.com/rust-lang/rust/pull/48629
4680[48657]: https://github.com/rust-lang/rust/pull/48657
4681[48735]: https://github.com/rust-lang/rust/pull/48735
4682[48978]: https://github.com/rust-lang/rust/pull/48978
4683[49101]: https://github.com/rust-lang/rust/pull/49101
4684[49109]: https://github.com/rust-lang/rust/pull/49109
4685[49121]: https://github.com/rust-lang/rust/pull/49121
4686[49162]: https://github.com/rust-lang/rust/pull/49162
4687[49184]: https://github.com/rust-lang/rust/pull/49184
4688[49234]: https://github.com/rust-lang/rust/pull/49234
4689[49255]: https://github.com/rust-lang/rust/pull/49255
4690[49299]: https://github.com/rust-lang/rust/pull/49299
4691[49305]: https://github.com/rust-lang/rust/pull/49305
4692[49394]: https://github.com/rust-lang/rust/pull/49394
4693[49458]: https://github.com/rust-lang/rust/pull/49458
4694[`*const T::add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.add
4695[`*const T::copy_to_nonoverlapping`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to_nonoverlapping
4696[`*const T::copy_to`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to
4697[`*const T::read_unaligned`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_unaligned
4698[`*const T::read_volatile`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_volatile
4699[`*const T::read`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read
4700[`*const T::sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.sub
4701[`*const T::wrapping_add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_add
4702[`*const T::wrapping_sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_sub
4703[`*mut T::add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.add-1
4704[`*mut T::copy_to_nonoverlapping`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to_nonoverlapping-1
4705[`*mut T::copy_to`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.copy_to-1
4706[`*mut T::read_unaligned`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_unaligned-1
4707[`*mut T::read_volatile`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read_volatile-1
4708[`*mut T::read`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.read-1
4709[`*mut T::replace`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.replace
4710[`*mut T::sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.sub-1
4711[`*mut T::swap`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.swap
4712[`*mut T::wrapping_add`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_add-1
4713[`*mut T::wrapping_sub`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_sub-1
4714[`*mut T::write_bytes`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write_bytes
4715[`*mut T::write_unaligned`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write_unaligned
4716[`*mut T::write_volatile`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write_volatile
4717[`*mut T::write`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.write
4718[`Box::leak`]: https://doc.rust-lang.org/std/boxed/struct.Box.html#method.leak
4719[`FromUtf8Error::as_bytes`]: https://doc.rust-lang.org/std/string/struct.FromUtf8Error.html#method.as_bytes
4720[`LocalKey::try_with`]: https://doc.rust-lang.org/std/thread/struct.LocalKey.html#method.try_with
4721[`Option::cloned`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.cloned
4722[`btree_map::Entry::and_modify`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.and_modify
4723[`fs::read_to_string`]: https://doc.rust-lang.org/std/fs/fn.read_to_string.html
4724[`fs::read`]: https://doc.rust-lang.org/std/fs/fn.read.html
4725[`fs::write`]: https://doc.rust-lang.org/std/fs/fn.write.html
4726[`hash_map::Entry::and_modify`]: https://doc.rust-lang.org/std/collections/hash_map/enum.Entry.html#method.and_modify
4727[`iter::FusedIterator`]: https://doc.rust-lang.org/std/iter/trait.FusedIterator.html
4728[`ops::RangeInclusive`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html
4729[`ops::RangeToInclusive`]: https://doc.rust-lang.org/std/ops/struct.RangeToInclusive.html
4730[`process::id`]: https://doc.rust-lang.org/std/process/fn.id.html
4731[`slice::rotate_left`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_left
4732[`slice::rotate_right`]: https://doc.rust-lang.org/std/primitive.slice.html#method.rotate_right
4733[`String::retain`]: https://doc.rust-lang.org/std/string/struct.String.html#method.retain
4734[cargo/5041]: https://github.com/rust-lang/cargo/pull/5041
4735[cargo/5083]: https://github.com/rust-lang/cargo/pull/5083
564c78a2
XL
4736
4737
0531ce1d
XL
4738Version 1.25.0 (2018-03-29)
4739==========================
4740
4741Language
4742--------
94b46f34 4743- [The `#[repr(align(x))]` attribute is now stable.][47006] [RFC 1358]
0531ce1d
XL
4744- [You can now use nested groups of imports.][47948]
4745 e.g. `use std::{fs::File, io::Read, path::{Path, PathBuf}};`
4746- [You can now have `|` at the start of a match arm.][47947] e.g.
4747```rust
4748enum Foo { A, B, C }
4749
4750fn main() {
4751 let x = Foo::A;
4752 match x {
4753 | Foo::A
4754 | Foo::B => println!("AB"),
4755 | Foo::C => println!("C"),
4756 }
4757}
4758```
4759
4760Compiler
4761--------
4762- [Upgraded to LLVM 6.][47828]
4763- [Added `-C lto=val` option.][47521]
4764- [Added `i586-unknown-linux-musl` target][47282]
4765
4766Libraries
4767---------
4768- [Impl Send for `process::Command` on Unix.][47760]
4769- [Impl PartialEq and Eq for `ParseCharError`.][47790]
4770- [`UnsafeCell::into_inner` is now safe.][47204]
4771- [Implement libstd for CloudABI.][47268]
4772- [`Float::{from_bits, to_bits}` is now available in libcore.][46931]
4773- [Implement `AsRef<Path>` for Component][46985]
4774- [Implemented `Write` for `Cursor<&mut Vec<u8>>`][46830]
4775- [Moved `Duration` to libcore.][46666]
4776
4777Stabilized APIs
4778---------------
4779- [`Location::column`]
4780- [`ptr::NonNull`]
4781
4782The following functions can now be used in a constant expression.
4783eg. `static MINUTE: Duration = Duration::from_secs(60);`
4784- [`Duration::new`][47300]
4785- [`Duration::from_secs`][47300]
4786- [`Duration::from_millis`][47300]
4787
4788Cargo
4789-----
4790- [`cargo new` no longer removes `rust` or `rs` prefixs/suffixs.][cargo/5013]
4791- [`cargo new` now defaults to creating a binary crate, instead of a
4792 library crate.][cargo/5029]
4793
4794Misc
4795----
4796- [Rust by example is now shipped with new releases][46196]
4797
4798Compatibility Notes
4799-------------------
4800- [Deprecated `net::lookup_host`.][47510]
4801- [`rustdoc` has switched to pulldown as the default markdown renderer.][47398]
4802- The borrow checker was sometimes incorrectly permitting overlapping borrows
4803 around indexing operations (see [#47349][47349]). This has been fixed (which also
4804 enabled some correct code that used to cause errors (e.g. [#33903][33903] and [#46095][46095]).
4805- [Removed deprecated unstable attribute `#[simd]`.][47251]
4806
4807[33903]: https://github.com/rust-lang/rust/pull/33903
4808[47947]: https://github.com/rust-lang/rust/pull/47947
4809[47948]: https://github.com/rust-lang/rust/pull/47948
4810[47760]: https://github.com/rust-lang/rust/pull/47760
4811[47790]: https://github.com/rust-lang/rust/pull/47790
4812[47828]: https://github.com/rust-lang/rust/pull/47828
4813[47398]: https://github.com/rust-lang/rust/pull/47398
4814[47510]: https://github.com/rust-lang/rust/pull/47510
4815[47521]: https://github.com/rust-lang/rust/pull/47521
4816[47204]: https://github.com/rust-lang/rust/pull/47204
4817[47251]: https://github.com/rust-lang/rust/pull/47251
4818[47268]: https://github.com/rust-lang/rust/pull/47268
4819[47282]: https://github.com/rust-lang/rust/pull/47282
4820[47300]: https://github.com/rust-lang/rust/pull/47300
4821[47349]: https://github.com/rust-lang/rust/pull/47349
4822[46931]: https://github.com/rust-lang/rust/pull/46931
4823[46985]: https://github.com/rust-lang/rust/pull/46985
4824[47006]: https://github.com/rust-lang/rust/pull/47006
4825[46830]: https://github.com/rust-lang/rust/pull/46830
4826[46095]: https://github.com/rust-lang/rust/pull/46095
4827[46666]: https://github.com/rust-lang/rust/pull/46666
4828[46196]: https://github.com/rust-lang/rust/pull/46196
4829[cargo/5013]: https://github.com/rust-lang/cargo/pull/5013
4830[cargo/5029]: https://github.com/rust-lang/cargo/pull/5029
4831[RFC 1358]: https://github.com/rust-lang/rfcs/pull/1358
4832[`Location::column`]: https://doc.rust-lang.org/std/panic/struct.Location.html#method.column
4833[`ptr::NonNull`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html
4834
4835
4836Version 1.24.1 (2018-03-01)
4837==========================
4838
4839 - [Do not abort when unwinding through FFI][48251]
4840 - [Emit UTF-16 files for linker arguments on Windows][48318]
4841 - [Make the error index generator work again][48308]
4842 - [Cargo will warn on Windows 7 if an update is needed][cargo/5069].
4843
4844[48251]: https://github.com/rust-lang/rust/issues/48251
4845[48308]: https://github.com/rust-lang/rust/issues/48308
4846[48318]: https://github.com/rust-lang/rust/issues/48318
4847[cargo/5069]: https://github.com/rust-lang/cargo/pull/5069
4848
4849
ff7c6d11
XL
4850Version 1.24.0 (2018-02-15)
4851==========================
4852
4853Language
4854--------
4855- [External `sysv64` ffi is now available.][46528]
4856 eg. `extern "sysv64" fn foo () {}`
4857
4858Compiler
4859--------
4860- [rustc now uses 16 codegen units by default for release builds.][46910]
4861 For the fastest builds, utilize `codegen-units=1`.
4862- [Added `armv4t-unknown-linux-gnueabi` target.][47018]
4863- [Add `aarch64-unknown-openbsd` support][46760]
4864
4865Libraries
4866---------
4867- [`str::find::<char>` now uses memchr.][46735] This should lead to a 10x
4868 improvement in performance in the majority of cases.
4869- [`OsStr`'s `Debug` implementation is now lossless and consistent
4870 with Windows.][46798]
4871- [`time::{SystemTime, Instant}` now implement `Hash`.][46828]
4872- [impl `From<bool>` for `AtomicBool`][46293]
4873- [impl `From<{CString, &CStr}>` for `{Arc<CStr>, Rc<CStr>}`][45990]
4874- [impl `From<{OsString, &OsStr}>` for `{Arc<OsStr>, Rc<OsStr>}`][45990]
4875- [impl `From<{PathBuf, &Path}>` for `{Arc<Path>, Rc<Path>}`][45990]
4876- [float::from_bits now just uses transmute.][46012] This provides
4877 some optimisations from LLVM.
4878- [Copied `AsciiExt` methods onto `char`][46077]
4879- [Remove `T: Sized` requirement on `ptr::is_null()`][46094]
4880- [impl `From<RecvError>` for `{TryRecvError, RecvTimeoutError}`][45506]
0531ce1d 4881- [Optimised `f32::{min, max}` to generate more efficient x86 assembly][47080]
ff7c6d11
XL
4882- [`[u8]::contains` now uses memchr which provides a 3x speed improvement][46713]
4883
4884Stabilized APIs
4885---------------
4886- [`RefCell::replace`]
4887- [`RefCell::swap`]
4888- [`atomic::spin_loop_hint`]
4889
4890The following functions can now be used in a constant expression.
4891eg. `let buffer: [u8; size_of::<usize>()];`, `static COUNTER: AtomicUsize = AtomicUsize::new(1);`
4892
4893- [`AtomicBool::new`][46287]
4894- [`AtomicUsize::new`][46287]
4895- [`AtomicIsize::new`][46287]
4896- [`AtomicPtr::new`][46287]
4897- [`Cell::new`][46287]
4898- [`{integer}::min_value`][46287]
4899- [`{integer}::max_value`][46287]
4900- [`mem::size_of`][46287]
4901- [`mem::align_of`][46287]
4902- [`ptr::null`][46287]
4903- [`ptr::null_mut`][46287]
4904- [`RefCell::new`][46287]
4905- [`UnsafeCell::new`][46287]
4906
4907Cargo
4908-----
4909- [Added a `workspace.default-members` config that
4910 overrides implied `--all` in virtual workspaces.][cargo/4743]
4911- [Enable incremental by default on development builds.][cargo/4817] Also added
4912 configuration keys to `Cargo.toml` and `.cargo/config` to disable on a
4913 per-project or global basis respectively.
4914
4915Misc
4916----
4917
4918Compatibility Notes
4919-------------------
4920- [Floating point types `Debug` impl now always prints a decimal point.][46831]
4921- [`Ipv6Addr` now rejects superfluous `::`'s in IPv6 addresses][46671] This is
4922 in accordance with IETF RFC 4291 §2.2.
4923- [Unwinding will no longer go past FFI boundaries, and will instead abort.][46833]
4924- [`Formatter::flags` method is now deprecated.][46284] The `sign_plus`,
4925 `sign_minus`, `alternate`, and `sign_aware_zero_pad` should be used instead.
4926- [Leading zeros in tuple struct members is now an error][47084]
4927- [`column!()` macro is one-based instead of zero-based][46977]
4928- [`fmt::Arguments` can no longer be shared across threads][45198]
4929- [Access to `#[repr(packed)]` struct fields is now unsafe][44884]
0531ce1d 4930- [Cargo sets a different working directory for the compiler][cargo/4788]
ff7c6d11
XL
4931
4932[44884]: https://github.com/rust-lang/rust/pull/44884
4933[45198]: https://github.com/rust-lang/rust/pull/45198
4934[45506]: https://github.com/rust-lang/rust/pull/45506
4935[45904]: https://github.com/rust-lang/rust/pull/45904
4936[45990]: https://github.com/rust-lang/rust/pull/45990
4937[46012]: https://github.com/rust-lang/rust/pull/46012
4938[46077]: https://github.com/rust-lang/rust/pull/46077
4939[46094]: https://github.com/rust-lang/rust/pull/46094
4940[46284]: https://github.com/rust-lang/rust/pull/46284
4941[46287]: https://github.com/rust-lang/rust/pull/46287
4942[46293]: https://github.com/rust-lang/rust/pull/46293
4943[46528]: https://github.com/rust-lang/rust/pull/46528
4944[46671]: https://github.com/rust-lang/rust/pull/46671
4945[46713]: https://github.com/rust-lang/rust/pull/46713
4946[46735]: https://github.com/rust-lang/rust/pull/46735
4947[46749]: https://github.com/rust-lang/rust/pull/46749
4948[46760]: https://github.com/rust-lang/rust/pull/46760
4949[46798]: https://github.com/rust-lang/rust/pull/46798
4950[46828]: https://github.com/rust-lang/rust/pull/46828
4951[46831]: https://github.com/rust-lang/rust/pull/46831
4952[46833]: https://github.com/rust-lang/rust/pull/46833
4953[46910]: https://github.com/rust-lang/rust/pull/46910
4954[46977]: https://github.com/rust-lang/rust/pull/46977
4955[47018]: https://github.com/rust-lang/rust/pull/47018
4956[47080]: https://github.com/rust-lang/rust/pull/47080
4957[47084]: https://github.com/rust-lang/rust/pull/47084
4958[cargo/4743]: https://github.com/rust-lang/cargo/pull/4743
0531ce1d 4959[cargo/4788]: https://github.com/rust-lang/cargo/pull/4788
ff7c6d11
XL
4960[cargo/4817]: https://github.com/rust-lang/cargo/pull/4817
4961[`RefCell::replace`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.replace
4962[`RefCell::swap`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.swap
4963[`atomic::spin_loop_hint`]: https://doc.rust-lang.org/std/sync/atomic/fn.spin_loop_hint.html
4964
4965
4966Version 1.23.0 (2018-01-04)
4967==========================
4968
4969Language
4970--------
4971- [Arbitrary `auto` traits are now permitted in trait objects.][45772]
4972- [rustc now uses subtyping on the left hand side of binary operations.][45435]
4973 Which should fix some confusing errors in some operations.
4974
4975Compiler
4976--------
4977- [Enabled `TrapUnreachable` in LLVM which should mitigate the impact of
4462d4a0 4978 undefined behavior.][45920]
ff7c6d11
XL
4979- [rustc now suggests renaming import if names clash.][45660]
4980- [Display errors/warnings correctly when there are zero-width or
4981 wide characters.][45711]
4982- [rustc now avoids unnecessary copies of arguments that are
4983 simple bindings][45380] This should improve memory usage on average by 5-10%.
4984- [Updated musl used to build musl rustc to 1.1.17][45393]
4985
4986Libraries
4987---------
4988- [Allow a trailing comma in `assert_eq/ne` macro][45887]
4989- [Implement Hash for raw pointers to unsized types][45483]
4990- [impl `From<*mut T>` for `AtomicPtr<T>`][45610]
4991- [impl `From<usize/isize>` for `AtomicUsize/AtomicIsize`.][45610]
4992- [Removed the `T: Sync` requirement for `RwLock<T>: Send`][45267]
4993- [Removed `T: Sized` requirement for `{<*const T>, <*mut T>}::as_ref`
4994 and `<*mut T>::as_mut`][44932]
4995- [Optimized `Thread::{park, unpark}` implementation][45524]
4996- [Improved `SliceExt::binary_search` performance.][45333]
4997- [impl `FromIterator<()>` for `()`][45379]
4998- [Copied `AsciiExt` trait methods to primitive types.][44042] Use of `AsciiExt`
4999 is now deprecated.
5000
5001Stabilized APIs
5002---------------
5003
5004Cargo
5005-----
ff7c6d11
XL
5006- [Cargo now supports uninstallation of multiple packages][cargo/4561]
5007 eg. `cargo uninstall foo bar` uninstalls `foo` and `bar`.
5008- [Added unit test checking to `cargo check`][cargo/4592]
5009- [Cargo now lets you install a specific version
5010 using `cargo install --version`][cargo/4637]
5011
5012Misc
5013----
5014- [Releases now ship with the Cargo book documentation.][45692]
5015- [rustdoc now prints rendering warnings on every run.][45324]
ff7c6d11
XL
5016
5017Compatibility Notes
5018-------------------
5019- [Changes have been made to type equality to make it more correct,
5020 in rare cases this could break some code.][45853] [Tracking issue for
5021 further information][45852]
5022- [`char::escape_debug` now uses Unicode 10 over 9.][45571]
5023- [Upgraded Android SDK to 27, and NDK to r15c.][45580] This drops support for
5024 Android 9, the minimum supported version is Android 14.
5025- [Bumped the minimum LLVM to 3.9][45326]
5026
5027[44042]: https://github.com/rust-lang/rust/pull/44042
5028[44932]: https://github.com/rust-lang/rust/pull/44932
5029[45267]: https://github.com/rust-lang/rust/pull/45267
5030[45324]: https://github.com/rust-lang/rust/pull/45324
5031[45326]: https://github.com/rust-lang/rust/pull/45326
5032[45333]: https://github.com/rust-lang/rust/pull/45333
5033[45379]: https://github.com/rust-lang/rust/pull/45379
5034[45380]: https://github.com/rust-lang/rust/pull/45380
5035[45393]: https://github.com/rust-lang/rust/pull/45393
5036[45435]: https://github.com/rust-lang/rust/pull/45435
5037[45483]: https://github.com/rust-lang/rust/pull/45483
5038[45524]: https://github.com/rust-lang/rust/pull/45524
5039[45571]: https://github.com/rust-lang/rust/pull/45571
5040[45580]: https://github.com/rust-lang/rust/pull/45580
5041[45610]: https://github.com/rust-lang/rust/pull/45610
5042[45660]: https://github.com/rust-lang/rust/pull/45660
5043[45692]: https://github.com/rust-lang/rust/pull/45692
5044[45711]: https://github.com/rust-lang/rust/pull/45711
5045[45772]: https://github.com/rust-lang/rust/pull/45772
5046[45852]: https://github.com/rust-lang/rust/issues/45852
5047[45853]: https://github.com/rust-lang/rust/pull/45853
5048[45887]: https://github.com/rust-lang/rust/pull/45887
ff7c6d11 5049[45920]: https://github.com/rust-lang/rust/pull/45920
ff7c6d11
XL
5050[cargo/4561]: https://github.com/rust-lang/cargo/pull/4561
5051[cargo/4592]: https://github.com/rust-lang/cargo/pull/4592
5052[cargo/4637]: https://github.com/rust-lang/cargo/pull/4637
5053
5054
5055Version 1.22.1 (2017-11-22)
5056==========================
5057
5058- [Update Cargo to fix an issue with macOS 10.13 "High Sierra"][46183]
5059
5060[46183]: https://github.com/rust-lang/rust/pull/46183
5061
5062Version 1.22.0 (2017-11-22)
abe05a73
XL
5063==========================
5064
5065Language
5066--------
5067- [`non_snake_case` lint now allows extern no-mangle functions][44966]
5068- [Now accepts underscores in unicode escapes][43716]
abe05a73
XL
5069- [`T op= &T` now works for numeric types.][44287] eg. `let mut x = 2; x += &8;`
5070- [types that impl `Drop` are now allowed in `const` and `static` types][44456]
5071
5072Compiler
5073--------
5074- [rustc now defaults to having 16 codegen units at debug on supported platforms.][45064]
5075- [rustc will no longer inline in codegen units when compiling for debug][45075]
5076 This should decrease compile times for debug builds.
5077- [strict memory alignment now enabled on ARMv6][45094]
5078- [Remove support for the PNaCl target `le32-unknown-nacl`][45041]
5079
5080Libraries
5081---------
5082- [Allow atomic operations up to 32 bits
5083 on `armv5te_unknown_linux_gnueabi`][44978]
5084- [`Box<Error>` now impls `From<Cow<str>>`][44466]
5085- [`std::mem::Discriminant` is now guaranteed to be `Send + Sync`][45095]
5086- [`fs::copy` now returns the length of the main stream on NTFS.][44895]
5087- [Properly detect overflow in `Instant += Duration`.][44220]
5088- [impl `Hasher` for `{&mut Hasher, Box<Hasher>}`][44015]
5089- [impl `fmt::Debug` for `SplitWhitespace`.][44303]
5090- [`Option<T>` now impls `Try`][42526] This allows for using `?` with `Option` types.
5091
5092Stabilized APIs
5093---------------
5094
5095Cargo
5096-----
5097- [Cargo will now build multi file examples in subdirectories of the `examples`
5098 folder that have a `main.rs` file.][cargo/4496]
5099- [Changed `[root]` to `[package]` in `Cargo.lock`][cargo/4571] Packages with
5100 the old format will continue to work and can be updated with `cargo update`.
5101- [Now supports vendoring git repositories][cargo/3992]
5102
5103Misc
5104----
5105- [`libbacktrace` is now available on Apple platforms.][44251]
ff7c6d11
XL
5106- [Stabilised the `compile_fail` attribute for code fences in doc-comments.][43949]
5107 This now lets you specify that a given code example will fail to compile.
abe05a73
XL
5108
5109Compatibility Notes
5110-------------------
5111- [The minimum Android version that rustc can build for has been bumped
5112 to `4.0` from `2.3`][45656]
5113- [Allowing `T op= &T` for numeric types has broken some type
5114 inference cases][45480]
5115
5116
5117[42526]: https://github.com/rust-lang/rust/pull/42526
5118[43017]: https://github.com/rust-lang/rust/pull/43017
5119[43716]: https://github.com/rust-lang/rust/pull/43716
5120[43949]: https://github.com/rust-lang/rust/pull/43949
5121[44015]: https://github.com/rust-lang/rust/pull/44015
5122[44220]: https://github.com/rust-lang/rust/pull/44220
5123[44251]: https://github.com/rust-lang/rust/pull/44251
5124[44287]: https://github.com/rust-lang/rust/pull/44287
5125[44303]: https://github.com/rust-lang/rust/pull/44303
5126[44456]: https://github.com/rust-lang/rust/pull/44456
5127[44466]: https://github.com/rust-lang/rust/pull/44466
5128[44895]: https://github.com/rust-lang/rust/pull/44895
5129[44966]: https://github.com/rust-lang/rust/pull/44966
5130[44978]: https://github.com/rust-lang/rust/pull/44978
5131[45041]: https://github.com/rust-lang/rust/pull/45041
5132[45064]: https://github.com/rust-lang/rust/pull/45064
5133[45075]: https://github.com/rust-lang/rust/pull/45075
5134[45094]: https://github.com/rust-lang/rust/pull/45094
5135[45095]: https://github.com/rust-lang/rust/pull/45095
5136[45480]: https://github.com/rust-lang/rust/issues/45480
5137[45656]: https://github.com/rust-lang/rust/pull/45656
5138[cargo/3992]: https://github.com/rust-lang/cargo/pull/3992
5139[cargo/4496]: https://github.com/rust-lang/cargo/pull/4496
5140[cargo/4571]: https://github.com/rust-lang/cargo/pull/4571
5141
5142
5143
5144
5145
5146
ea8adc8c
XL
5147Version 1.21.0 (2017-10-12)
5148==========================
5149
5150Language
5151--------
ea8adc8c
XL
5152- [You can now use static references for literals.][43838]
5153 Example:
5154 ```rust
5155 fn main() {
5156 let x: &'static u32 = &0;
5157 }
5158 ```
abe05a73
XL
5159- [Relaxed path syntax. Optional `::` before `<` is now allowed in all contexts.][43540]
5160 Example:
5161 ```rust
5162 my_macro!(Vec<i32>::new); // Always worked
5163 my_macro!(Vec::<i32>::new); // Now works
5164 ```
ea8adc8c
XL
5165
5166Compiler
5167--------
5168- [Upgraded jemalloc to 4.5.0][43911]
5169- [Enabled unwinding panics on Redox][43917]
5170- [Now runs LLVM in parallel during translation phase.][43506]
5171 This should reduce peak memory usage.
5172
5173Libraries
5174---------
5175- [Generate builtin impls for `Clone` for all arrays and tuples that
5176 are `T: Clone`][43690]
5177- [`Stdin`, `Stdout`, and `Stderr` now implement `AsRawFd`.][43459]
5178- [`Rc` and `Arc` now implement `From<&[T]> where T: Clone`, `From<str>`,
5179 `From<String>`, `From<Box<T>> where T: ?Sized`, and `From<Vec<T>>`.][42565]
5180
5181Stabilized APIs
5182---------------
5183
5184[`std::mem::discriminant`]
5185
5186Cargo
5187-----
5188- [You can now call `cargo install` with multiple package names][cargo/4216]
5189- [Cargo commands inside a virtual workspace will now implicitly
5190 pass `--all`][cargo/4335]
5191- [Added a `[patch]` section to `Cargo.toml` to handle
5192 prepublication dependencies][cargo/4123] [RFC 1969]
5193- [`include` & `exclude` fields in `Cargo.toml` now accept gitignore
5194 like patterns][cargo/4270]
5195- [Added the `--all-targets` option][cargo/4400]
5196- [Using required dependencies as a feature is now deprecated and emits
5197 a warning][cargo/4364]
5198
5199
5200Misc
5201----
5202- [Cargo docs are moving][43916]
5203 to [doc.rust-lang.org/cargo](https://doc.rust-lang.org/cargo)
5204- [The rustdoc book is now available][43863]
5205 at [doc.rust-lang.org/rustdoc](https://doc.rust-lang.org/rustdoc)
5206- [Added a preview of RLS has been made available through rustup][44204]
5207 Install with `rustup component add rls-preview`
5208- [`std::os` documentation for Unix, Linux, and Windows now appears on doc.rust-lang.org][43348]
5209 Previously only showed `std::os::unix`.
5210
5211Compatibility Notes
5212-------------------
5213- [Changes in method matching against higher-ranked types][43880] This may cause
5214 breakage in subtyping corner cases. [A more in-depth explanation is available.][info/43880]
5215- [rustc's JSON error output's byte position start at top of file.][42973]
5216 Was previously relative to the rustc's internal `CodeMap` struct which
5217 required the unstable library `libsyntax` to correctly use.
5218- [`unused_results` lint no longer ignores booleans][43728]
5219
5220[42565]: https://github.com/rust-lang/rust/pull/42565
5221[42973]: https://github.com/rust-lang/rust/pull/42973
5222[43348]: https://github.com/rust-lang/rust/pull/43348
5223[43459]: https://github.com/rust-lang/rust/pull/43459
5224[43506]: https://github.com/rust-lang/rust/pull/43506
5225[43540]: https://github.com/rust-lang/rust/pull/43540
5226[43690]: https://github.com/rust-lang/rust/pull/43690
5227[43728]: https://github.com/rust-lang/rust/pull/43728
5228[43838]: https://github.com/rust-lang/rust/pull/43838
5229[43863]: https://github.com/rust-lang/rust/pull/43863
5230[43880]: https://github.com/rust-lang/rust/pull/43880
5231[43911]: https://github.com/rust-lang/rust/pull/43911
5232[43916]: https://github.com/rust-lang/rust/pull/43916
5233[43917]: https://github.com/rust-lang/rust/pull/43917
5234[44204]: https://github.com/rust-lang/rust/pull/44204
5235[cargo/4123]: https://github.com/rust-lang/cargo/pull/4123
5236[cargo/4216]: https://github.com/rust-lang/cargo/pull/4216
5237[cargo/4270]: https://github.com/rust-lang/cargo/pull/4270
5238[cargo/4335]: https://github.com/rust-lang/cargo/pull/4335
5239[cargo/4364]: https://github.com/rust-lang/cargo/pull/4364
5240[cargo/4400]: https://github.com/rust-lang/cargo/pull/4400
5241[RFC 1969]: https://github.com/rust-lang/rfcs/pull/1969
5242[info/43880]: https://github.com/rust-lang/rust/issues/44224#issuecomment-330058902
5243[`std::mem::discriminant`]: https://doc.rust-lang.org/std/mem/fn.discriminant.html
5244
3b2f2976
XL
5245Version 1.20.0 (2017-08-31)
5246===========================
5247
5248Language
5249--------
ea8adc8c 5250- [Associated constants are now stabilised.][42809]
3b2f2976
XL
5251- [A lot of macro bugs are now fixed.][42913]
5252
5253Compiler
5254--------
5255
5256- [Struct fields are now properly coerced to the expected field type.][42807]
5257- [Enabled wasm LLVM backend][42571] WASM can now be built with the
5258 `wasm32-experimental-emscripten` target.
5259- [Changed some of the error messages to be more helpful.][42033]
5260- [Add support for RELRO(RELocation Read-Only) for platforms that support
5261 it.][43170]
5262- [rustc now reports the total number of errors on compilation failure][43015]
5263 previously this was only the number of errors in the pass that failed.
5264- [Expansion in rustc has been sped up 29x.][42533]
5265- [added `msp430-none-elf` target.][43099]
5266- [rustc will now suggest one-argument enum variant to fix type mismatch when
5267 applicable][43178]
5268- [Fixes backtraces on Redox][43228]
5269- [rustc now identifies different versions of same crate when absolute paths of
5270 different types match in an error message.][42826]
5271
5272Libraries
5273---------
5274
5275
5276- [Relaxed Debug constraints on `{HashMap,BTreeMap}::{Keys,Values}`.][42854]
5277- [Impl `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Debug`, `Hash` for unsized
5278 tuples.][43011]
5279- [Impl `fmt::{Display, Debug}` for `Ref`, `RefMut`, `MutexGuard`,
5280 `RwLockReadGuard`, `RwLockWriteGuard`][42822]
5281- [Impl `Clone` for `DefaultHasher`.][42799]
5282- [Impl `Sync` for `SyncSender`.][42397]
5283- [Impl `FromStr` for `char`][42271]
5284- [Fixed how `{f32, f64}::{is_sign_negative, is_sign_positive}` handles
5285 NaN.][42431]
5286- [allow messages in the `unimplemented!()` macro.][42155]
5287 ie. `unimplemented!("Waiting for 1.21 to be stable")`
5288- [`pub(restricted)` is now supported in the `thread_local!` macro.][43185]
5289- [Upgrade to Unicode 10.0.0][42999]
5290- [Reimplemented `{f32, f64}::{min, max}` in Rust instead of using CMath.][42430]
5291- [Skip the main thread's manual stack guard on Linux][43072]
dc3f5686 5292- [Iterator::nth for `ops::{Range, RangeFrom}` is now done in *O*(1) time][43077]
3b2f2976
XL
5293- [`#[repr(align(N))]` attribute max number is now 2^31 - 1.][43097] This was
5294 previously 2^15.
5295- [`{OsStr, Path}::Display` now avoids allocations where possible][42613]
5296
5297Stabilized APIs
5298---------------
5299
5300- [`CStr::into_c_string`]
5301- [`CString::as_c_str`]
5302- [`CString::into_boxed_c_str`]
5303- [`Chain::get_mut`]
5304- [`Chain::get_ref`]
5305- [`Chain::into_inner`]
5306- [`Option::get_or_insert_with`]
5307- [`Option::get_or_insert`]
5308- [`OsStr::into_os_string`]
5309- [`OsString::into_boxed_os_str`]
5310- [`Take::get_mut`]
5311- [`Take::get_ref`]
5312- [`Utf8Error::error_len`]
5313- [`char::EscapeDebug`]
5314- [`char::escape_debug`]
5315- [`compile_error!`]
5316- [`f32::from_bits`]
5317- [`f32::to_bits`]
5318- [`f64::from_bits`]
5319- [`f64::to_bits`]
5320- [`mem::ManuallyDrop`]
5321- [`slice::sort_unstable_by_key`]
5322- [`slice::sort_unstable_by`]
5323- [`slice::sort_unstable`]
ea8adc8c 5324- [`str::from_boxed_utf8_unchecked`]
3b2f2976
XL
5325- [`str::as_bytes_mut`]
5326- [`str::as_bytes_mut`]
5327- [`str::from_utf8_mut`]
5328- [`str::from_utf8_unchecked_mut`]
5329- [`str::get_mut`]
5330- [`str::get_unchecked_mut`]
5331- [`str::get_unchecked`]
5332- [`str::get`]
5333- [`str::into_boxed_bytes`]
5334
5335
5336Cargo
5337-----
5338- [Cargo API token location moved from `~/.cargo/config` to
5339 `~/.cargo/credentials`.][cargo/3978]
5340- [Cargo will now build `main.rs` binaries that are in sub-directories of
5341 `src/bin`.][cargo/4214] ie. Having `src/bin/server/main.rs` and
5342 `src/bin/client/main.rs` generates `target/debug/server` and `target/debug/client`
5343- [You can now specify version of a binary when installed through
5344 `cargo install` using `--vers`.][cargo/4229]
5345- [Added `--no-fail-fast` flag to cargo to run all benchmarks regardless of
5346 failure.][cargo/4248]
5347- [Changed the convention around which file is the crate root.][cargo/4259]
5348- [The `include`/`exclude` property in `Cargo.toml` now accepts gitignore paths
5349 instead of glob patterns][cargo/4270]. Glob patterns are now deprecated.
5350
5351Compatibility Notes
5352-------------------
5353
5354- [Functions with `'static` in their return types will now not be as usable as
5355 if they were using lifetime parameters instead.][42417]
5356- [The reimplementation of `{f32, f64}::is_sign_{negative, positive}` now
ea8adc8c 5357 takes the sign of NaN into account where previously didn't.][42430]
3b2f2976
XL
5358
5359[42033]: https://github.com/rust-lang/rust/pull/42033
5360[42155]: https://github.com/rust-lang/rust/pull/42155
5361[42271]: https://github.com/rust-lang/rust/pull/42271
5362[42397]: https://github.com/rust-lang/rust/pull/42397
5363[42417]: https://github.com/rust-lang/rust/pull/42417
5364[42430]: https://github.com/rust-lang/rust/pull/42430
5365[42431]: https://github.com/rust-lang/rust/pull/42431
5366[42533]: https://github.com/rust-lang/rust/pull/42533
5367[42571]: https://github.com/rust-lang/rust/pull/42571
5368[42613]: https://github.com/rust-lang/rust/pull/42613
5369[42799]: https://github.com/rust-lang/rust/pull/42799
5370[42807]: https://github.com/rust-lang/rust/pull/42807
5371[42809]: https://github.com/rust-lang/rust/pull/42809
5372[42822]: https://github.com/rust-lang/rust/pull/42822
5373[42826]: https://github.com/rust-lang/rust/pull/42826
5374[42854]: https://github.com/rust-lang/rust/pull/42854
5375[42913]: https://github.com/rust-lang/rust/pull/42913
5376[42999]: https://github.com/rust-lang/rust/pull/42999
5377[43011]: https://github.com/rust-lang/rust/pull/43011
5378[43015]: https://github.com/rust-lang/rust/pull/43015
5379[43072]: https://github.com/rust-lang/rust/pull/43072
5380[43077]: https://github.com/rust-lang/rust/pull/43077
5381[43097]: https://github.com/rust-lang/rust/pull/43097
5382[43099]: https://github.com/rust-lang/rust/pull/43099
5383[43170]: https://github.com/rust-lang/rust/pull/43170
5384[43178]: https://github.com/rust-lang/rust/pull/43178
5385[43185]: https://github.com/rust-lang/rust/pull/43185
5386[43228]: https://github.com/rust-lang/rust/pull/43228
5387[cargo/3978]: https://github.com/rust-lang/cargo/pull/3978
5388[cargo/4214]: https://github.com/rust-lang/cargo/pull/4214
5389[cargo/4229]: https://github.com/rust-lang/cargo/pull/4229
5390[cargo/4248]: https://github.com/rust-lang/cargo/pull/4248
5391[cargo/4259]: https://github.com/rust-lang/cargo/pull/4259
5392[cargo/4270]: https://github.com/rust-lang/cargo/pull/4270
5393[`CStr::into_c_string`]: https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.into_c_string
5394[`CString::as_c_str`]: https://doc.rust-lang.org/std/ffi/struct.CString.html#method.as_c_str
5395[`CString::into_boxed_c_str`]: https://doc.rust-lang.org/std/ffi/struct.CString.html#method.into_boxed_c_str
5396[`Chain::get_mut`]: https://doc.rust-lang.org/std/io/struct.Chain.html#method.get_mut
5397[`Chain::get_ref`]: https://doc.rust-lang.org/std/io/struct.Chain.html#method.get_ref
5398[`Chain::into_inner`]: https://doc.rust-lang.org/std/io/struct.Chain.html#method.into_inner
5399[`Option::get_or_insert_with`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.get_or_insert_with
5400[`Option::get_or_insert`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.get_or_insert
5401[`OsStr::into_os_string`]: https://doc.rust-lang.org/std/ffi/struct.OsStr.html#method.into_os_string
5402[`OsString::into_boxed_os_str`]: https://doc.rust-lang.org/std/ffi/struct.OsString.html#method.into_boxed_os_str
5403[`Take::get_mut`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.get_mut
5404[`Take::get_ref`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.get_ref
5405[`Utf8Error::error_len`]: https://doc.rust-lang.org/std/str/struct.Utf8Error.html#method.error_len
5406[`char::EscapeDebug`]: https://doc.rust-lang.org/std/char/struct.EscapeDebug.html
5407[`char::escape_debug`]: https://doc.rust-lang.org/std/primitive.char.html#method.escape_debug
5408[`compile_error!`]: https://doc.rust-lang.org/std/macro.compile_error.html
5409[`f32::from_bits`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_bits
5410[`f32::to_bits`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_bits
5411[`f64::from_bits`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_bits
5412[`f64::to_bits`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_bits
5413[`mem::ManuallyDrop`]: https://doc.rust-lang.org/std/mem/union.ManuallyDrop.html
5414[`slice::sort_unstable_by_key`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable_by_key
5415[`slice::sort_unstable_by`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable_by
5416[`slice::sort_unstable`]: https://doc.rust-lang.org/std/primitive.slice.html#method.sort_unstable
ea8adc8c 5417[`str::from_boxed_utf8_unchecked`]: https://doc.rust-lang.org/std/str/fn.from_boxed_utf8_unchecked.html
3b2f2976
XL
5418[`str::as_bytes_mut`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_bytes_mut
5419[`str::from_utf8_mut`]: https://doc.rust-lang.org/std/str/fn.from_utf8_mut.html
5420[`str::from_utf8_unchecked_mut`]: https://doc.rust-lang.org/std/str/fn.from_utf8_unchecked_mut.html
5421[`str::get_mut`]: https://doc.rust-lang.org/std/primitive.str.html#method.get_mut
5422[`str::get_unchecked_mut`]: https://doc.rust-lang.org/std/primitive.str.html#method.get_unchecked_mut
5423[`str::get_unchecked`]: https://doc.rust-lang.org/std/primitive.str.html#method.get_unchecked
5424[`str::get`]: https://doc.rust-lang.org/std/primitive.str.html#method.get
5425[`str::into_boxed_bytes`]: https://doc.rust-lang.org/std/primitive.str.html#method.into_boxed_bytes
5426
5427
5428Version 1.19.0 (2017-07-20)
5429===========================
5430
5431Language
5432--------
5433
5434- [Numeric fields can now be used for creating tuple structs.][41145] [RFC 1506]
5435 For example `struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };`.
5436- [Macro recursion limit increased to 1024 from 64.][41676]
5437- [Added lint for detecting unused macros.][41907]
5438- [`loop` can now return a value with `break`.][42016] [RFC 1624]
5439 For example: `let x = loop { break 7; };`
5440- [C compatible `union`s are now available.][42068] [RFC 1444] They can only
5441 contain `Copy` types and cannot have a `Drop` implementation.
5442 Example: `union Foo { bar: u8, baz: usize }`
5443- [Non capturing closures can now be coerced into `fn`s,][42162] [RFC 1558]
5444 Example: `let foo: fn(u8) -> u8 = |v: u8| { v };`
5445
5446Compiler
5447--------
5448
5449- [Add support for bootstrapping the Rust compiler toolchain on Android.][41370]
5450- [Change `arm-linux-androideabi` to correspond to the `armeabi`
5451 official ABI.][41656] If you wish to continue targeting the `armeabi-v7a` ABI
5452 you should use `--target armv7-linux-androideabi`.
5453- [Fixed ICE when removing a source file between compilation sessions.][41873]
5454- [Minor optimisation of string operations.][42037]
5455- [Compiler error message is now `aborting due to previous error(s)` instead of
5456 `aborting due to N previous errors`][42150] This was previously inaccurate and
5457 would only count certain kinds of errors.
5458- [The compiler now supports Visual Studio 2017][42225]
5459- [The compiler is now built against LLVM 4.0.1 by default][42948]
5460- [Added a lot][42264] of [new error codes][42302]
5461- [Added `target-feature=+crt-static` option][37406] [RFC 1721] Which allows
5462 libraries with C Run-time Libraries(CRT) to be statically linked.
5463- [Fixed various ARM codegen bugs][42740]
5464
5465Libraries
5466---------
5467
5468- [`String` now implements `FromIterator<Cow<'a, str>>` and
5469 `Extend<Cow<'a, str>>`][41449]
5470- [`Vec` now implements `From<&mut [T]>`][41530]
5471- [`Box<[u8]>` now implements `From<Box<str>>`][41258]
5472- [`SplitWhitespace` now implements `Clone`][41659]
5473- [`[u8]::reverse` is now 5x faster and `[u16]::reverse` is now
5474 1.5x faster][41764]
5475- [`eprint!` and `eprintln!` macros added to prelude.][41192] Same as the `print!`
5476 macros, but for printing to stderr.
5477
5478Stabilized APIs
5479---------------
5480
5481- [`OsString::shrink_to_fit`]
5482- [`cmp::Reverse`]
5483- [`Command::envs`]
5484- [`thread::ThreadId`]
5485
5486Cargo
5487-----
5488
5489- [Build scripts can now add environment variables to the environment
5490 the crate is being compiled in.
5491 Example: `println!("cargo:rustc-env=FOO=bar");`][cargo/3929]
5492- [Subcommands now replace the current process rather than spawning a new
5493 child process][cargo/3970]
5494- [Workspace members can now accept glob file patterns][cargo/3979]
5495- [Added `--all` flag to the `cargo bench` subcommand to run benchmarks of all
5496 the members in a given workspace.][cargo/3988]
5497- [Updated `libssh2-sys` to 0.2.6][cargo/4008]
5498- [Target directory path is now in the cargo metadata][cargo/4022]
5499- [Cargo no longer checks out a local working directory for the
5500 crates.io index][cargo/4026] This should provide smaller file size for the
5501 registry, and improve cloning times, especially on Windows machines.
5502- [Added an `--exclude` option for excluding certain packages when using the
5503 `--all` option][cargo/4031]
5504- [Cargo will now automatically retry when receiving a 5xx error
5505 from crates.io][cargo/4032]
5506- [The `--features` option now accepts multiple comma or space
5507 delimited values.][cargo/4084]
5508- [Added support for custom target specific runners][cargo/3954]
5509
5510Misc
5511----
5512
5513- [Added `rust-windbg.cmd`][39983] for loading rust `.natvis` files in the
5514 Windows Debugger.
5515- [Rust will now release XZ compressed packages][rust-installer/57]
5516- [rustup will now prefer to download rust packages with
5517 XZ compression][rustup/1100] over GZip packages.
5518- [Added the ability to escape `#` in rust documentation][41785] By adding
5519 additional `#`'s ie. `##` is now `#`
5520
5521Compatibility Notes
5522-------------------
5523
5524- [`MutexGuard<T>` may only be `Sync` if `T` is `Sync`.][41624]
5525- [`-Z` flags are now no longer allowed to be used on the stable
5526 compiler.][41751] This has been a warning for a year previous to this.
5527- [As a result of the `-Z` flag change, the `cargo-check` plugin no
5528 longer works][42844]. Users should migrate to the built-in `check`
5529 command, which has been available since 1.16.
5530- [Ending a float literal with `._` is now a hard error.
5531 Example: `42._` .][41946]
5532- [Any use of a private `extern crate` outside of its module is now a
5533 hard error.][36886] This was previously a warning.
5534- [`use ::self::foo;` is now a hard error.][36888] `self` paths are always
5535 relative while the `::` prefix makes a path absolute, but was ignored and the
5536 path was relative regardless.
5537- [Floating point constants in match patterns is now a hard error][36890]
5538 This was previously a warning.
5539- [Struct or enum constants that don't derive `PartialEq` & `Eq` used
5540 match patterns is now a hard error][36891] This was previously a warning.
5541- [Lifetimes named `'_` are no longer allowed.][36892] This was previously
5542 a warning.
5543- [From the pound escape, lines consisting of multiple `#`s are
5544 now visible][41785]
2c00a5a8 5545- [It is an error to re-export private enum variants][42460]. This is
3b2f2976
XL
5546 known to break a number of crates that depend on an older version of
5547 mustache.
5548- [On Windows, if `VCINSTALLDIR` is set incorrectly, `rustc` will try
5549 to use it to find the linker, and the build will fail where it did
5550 not previously][42607]
5551
5552[36886]: https://github.com/rust-lang/rust/issues/36886
5553[36888]: https://github.com/rust-lang/rust/issues/36888
5554[36890]: https://github.com/rust-lang/rust/issues/36890
5555[36891]: https://github.com/rust-lang/rust/issues/36891
5556[36892]: https://github.com/rust-lang/rust/issues/36892
5557[37406]: https://github.com/rust-lang/rust/issues/37406
5558[39983]: https://github.com/rust-lang/rust/pull/39983
5559[41145]: https://github.com/rust-lang/rust/pull/41145
5560[41192]: https://github.com/rust-lang/rust/pull/41192
5561[41258]: https://github.com/rust-lang/rust/pull/41258
5562[41370]: https://github.com/rust-lang/rust/pull/41370
5563[41449]: https://github.com/rust-lang/rust/pull/41449
5564[41530]: https://github.com/rust-lang/rust/pull/41530
5565[41624]: https://github.com/rust-lang/rust/pull/41624
5566[41656]: https://github.com/rust-lang/rust/pull/41656
5567[41659]: https://github.com/rust-lang/rust/pull/41659
5568[41676]: https://github.com/rust-lang/rust/pull/41676
5569[41751]: https://github.com/rust-lang/rust/pull/41751
5570[41764]: https://github.com/rust-lang/rust/pull/41764
5571[41785]: https://github.com/rust-lang/rust/pull/41785
5572[41873]: https://github.com/rust-lang/rust/pull/41873
5573[41907]: https://github.com/rust-lang/rust/pull/41907
5574[41946]: https://github.com/rust-lang/rust/pull/41946
5575[42016]: https://github.com/rust-lang/rust/pull/42016
5576[42037]: https://github.com/rust-lang/rust/pull/42037
5577[42068]: https://github.com/rust-lang/rust/pull/42068
5578[42150]: https://github.com/rust-lang/rust/pull/42150
5579[42162]: https://github.com/rust-lang/rust/pull/42162
5580[42225]: https://github.com/rust-lang/rust/pull/42225
5581[42264]: https://github.com/rust-lang/rust/pull/42264
5582[42302]: https://github.com/rust-lang/rust/pull/42302
5583[42460]: https://github.com/rust-lang/rust/issues/42460
5584[42607]: https://github.com/rust-lang/rust/issues/42607
5585[42740]: https://github.com/rust-lang/rust/pull/42740
5586[42844]: https://github.com/rust-lang/rust/issues/42844
5587[42948]: https://github.com/rust-lang/rust/pull/42948
5588[RFC 1444]: https://github.com/rust-lang/rfcs/pull/1444
5589[RFC 1506]: https://github.com/rust-lang/rfcs/pull/1506
5590[RFC 1558]: https://github.com/rust-lang/rfcs/pull/1558
5591[RFC 1624]: https://github.com/rust-lang/rfcs/pull/1624
5592[RFC 1721]: https://github.com/rust-lang/rfcs/pull/1721
5593[`Command::envs`]: https://doc.rust-lang.org/std/process/struct.Command.html#method.envs
5594[`OsString::shrink_to_fit`]: https://doc.rust-lang.org/std/ffi/struct.OsString.html#method.shrink_to_fit
5595[`cmp::Reverse`]: https://doc.rust-lang.org/std/cmp/struct.Reverse.html
5596[`thread::ThreadId`]: https://doc.rust-lang.org/std/thread/struct.ThreadId.html
5597[cargo/3929]: https://github.com/rust-lang/cargo/pull/3929
5598[cargo/3954]: https://github.com/rust-lang/cargo/pull/3954
5599[cargo/3970]: https://github.com/rust-lang/cargo/pull/3970
5600[cargo/3979]: https://github.com/rust-lang/cargo/pull/3979
5601[cargo/3988]: https://github.com/rust-lang/cargo/pull/3988
5602[cargo/4008]: https://github.com/rust-lang/cargo/pull/4008
5603[cargo/4022]: https://github.com/rust-lang/cargo/pull/4022
5604[cargo/4026]: https://github.com/rust-lang/cargo/pull/4026
5605[cargo/4031]: https://github.com/rust-lang/cargo/pull/4031
5606[cargo/4032]: https://github.com/rust-lang/cargo/pull/4032
5607[cargo/4084]: https://github.com/rust-lang/cargo/pull/4084
5608[rust-installer/57]: https://github.com/rust-lang/rust-installer/pull/57
5609[rustup/1100]: https://github.com/rust-lang-nursery/rustup.rs/pull/1100
5610
5611
cc61c64b
XL
5612Version 1.18.0 (2017-06-08)
5613===========================
5614
5615Language
5616--------
5617
5618- [Stabilize pub(restricted)][40556] `pub` can now accept a module path to
5619 make the item visible to just that module tree. Also accepts the keyword
5620 `crate` to make something public to the whole crate but not users of the
5621 library. Example: `pub(crate) mod utils;`. [RFC 1422].
5622- [Stabilize `#![windows_subsystem]` attribute][40870] conservative exposure of the
5623 `/SUBSYSTEM` linker flag on Windows platforms. [RFC 1665].
5624- [Refactor of trait object type parsing][40043] Now `ty` in macros can accept
5625 types like `Write + Send`, trailing `+` are now supported in trait objects,
5626 and better error reporting for trait objects starting with `?Sized`.
5627- [0e+10 is now a valid floating point literal][40589]
5628- [Now warns if you bind a lifetime parameter to 'static][40734]
5629- [Tuples, Enum variant fields, and structs with no `repr` attribute or with
5630 `#[repr(Rust)]` are reordered to minimize padding and produce a smaller
5631 representation in some cases.][40377]
5632
5633Compiler
5634--------
5635
5636- [rustc can now emit mir with `--emit mir`][39891]
5637- [Improved LLVM IR for trivial functions][40367]
5638- [Added explanation for E0090(Wrong number of lifetimes are supplied)][40723]
5639- [rustc compilation is now 15%-20% faster][41469] Thanks to optimisation
5640 opportunities found through profiling
5641- [Improved backtrace formatting when panicking][38165]
5642
5643Libraries
5644---------
5645
5646- [Specialized `Vec::from_iter` being passed `vec::IntoIter`][40731] if the
5647 iterator hasn't been advanced the original `Vec` is reassembled with no actual
5648 iteration or reallocation.
5649- [Simplified HashMap Bucket interface][40561] provides performance
5650 improvements for iterating and cloning.
5651- [Specialize Vec::from_elem to use calloc][40409]
5652- [Fixed Race condition in fs::create_dir_all][39799]
5653- [No longer caching stdio on Windows][40516]
5654- [Optimized insertion sort in slice][40807] insertion sort in some cases
5655 2.50%~ faster and in one case now 12.50% faster.
5656- [Optimized `AtomicBool::fetch_nand`][41143]
5657
5658Stabilized APIs
5659---------------
5660
5661- [`Child::try_wait`]
5662- [`HashMap::retain`]
5663- [`HashSet::retain`]
5664- [`PeekMut::pop`]
5665- [`TcpStream::peek`]
5666- [`UdpSocket::peek`]
5667- [`UdpSocket::peek_from`]
5668
5669Cargo
5670-----
5671
5672- [Added partial Pijul support][cargo/3842] Pijul is a version control system in Rust.
5673 You can now create new cargo projects with Pijul using `cargo new --vcs pijul`
5674- [Now always emits build script warnings for crates that fail to build][cargo/3847]
5675- [Added Android build support][cargo/3885]
5676- [Added `--bins` and `--tests` flags][cargo/3901] now you can build all programs
5677 of a certain type, for example `cargo build --bins` will build all
5678 binaries.
5679- [Added support for haiku][cargo/3952]
5680
5681Misc
5682----
5683
5684- [rustdoc can now use pulldown-cmark with the `--enable-commonmark` flag][40338]
ff7c6d11 5685- [Added rust-windbg script for better debugging on Windows][39983]
cc61c64b
XL
5686- [Rust now uses the official cross compiler for NetBSD][40612]
5687- [rustdoc now accepts `#` at the start of files][40828]
5688- [Fixed jemalloc support for musl][41168]
5689
5690Compatibility Notes
5691-------------------
5692
5693- [Changes to how the `0` flag works in format!][40241] Padding zeroes are now
5694 always placed after the sign if it exists and before the digits. With the `#`
5695 flag the zeroes are placed after the prefix and before the digits.
5696- [Due to the struct field optimisation][40377], using `transmute` on structs
5697 that have no `repr` attribute or `#[repr(Rust)]` will no longer work. This has
5698 always been undefined behavior, but is now more likely to break in practice.
5699- [The refactor of trait object type parsing][40043] fixed a bug where `+` was
5700 receiving the wrong priority parsing things like `&for<'a> Tr<'a> + Send` as
5701 `&(for<'a> Tr<'a> + Send)` instead of `(&for<'a> Tr<'a>) + Send`
5702- [Overlapping inherent `impl`s are now a hard error][40728]
5703- [`PartialOrd` and `Ord` must agree on the ordering.][41270]
5704- [`rustc main.rs -o out --emit=asm,llvm-ir`][41085] Now will output
5705 `out.asm` and `out.ll` instead of only one of the filetypes.
5706- [ calling a function that returns `Self` will no longer work][41805] when
5707 the size of `Self` cannot be statically determined.
5708- [rustc now builds with a "pthreads" flavour of MinGW for Windows GNU][40805]
5709 this has caused a few regressions namely:
5710
5711 - Changed the link order of local static/dynamic libraries (respecting the
5712 order on given rather than having the compiler reorder).
5713 - Changed how MinGW is linked, native code linked to dynamic libraries
5714 may require manually linking to the gcc support library (for the native
5715 code itself)
5716
5717[38165]: https://github.com/rust-lang/rust/pull/38165
5718[39799]: https://github.com/rust-lang/rust/pull/39799
5719[39891]: https://github.com/rust-lang/rust/pull/39891
5720[39983]: https://github.com/rust-lang/rust/pull/39983
5721[40043]: https://github.com/rust-lang/rust/pull/40043
5722[40241]: https://github.com/rust-lang/rust/pull/40241
5723[40338]: https://github.com/rust-lang/rust/pull/40338
5724[40367]: https://github.com/rust-lang/rust/pull/40367
5725[40377]: https://github.com/rust-lang/rust/pull/40377
5726[40409]: https://github.com/rust-lang/rust/pull/40409
5727[40516]: https://github.com/rust-lang/rust/pull/40516
5728[40556]: https://github.com/rust-lang/rust/pull/40556
5729[40561]: https://github.com/rust-lang/rust/pull/40561
5730[40589]: https://github.com/rust-lang/rust/pull/40589
5731[40612]: https://github.com/rust-lang/rust/pull/40612
5732[40723]: https://github.com/rust-lang/rust/pull/40723
5733[40728]: https://github.com/rust-lang/rust/pull/40728
5734[40731]: https://github.com/rust-lang/rust/pull/40731
5735[40734]: https://github.com/rust-lang/rust/pull/40734
5736[40805]: https://github.com/rust-lang/rust/pull/40805
5737[40807]: https://github.com/rust-lang/rust/pull/40807
5738[40828]: https://github.com/rust-lang/rust/pull/40828
5739[40870]: https://github.com/rust-lang/rust/pull/40870
5740[41085]: https://github.com/rust-lang/rust/pull/41085
5741[41143]: https://github.com/rust-lang/rust/pull/41143
5742[41168]: https://github.com/rust-lang/rust/pull/41168
5743[41270]: https://github.com/rust-lang/rust/issues/41270
5744[41469]: https://github.com/rust-lang/rust/pull/41469
5745[41805]: https://github.com/rust-lang/rust/issues/41805
5746[RFC 1422]: https://github.com/rust-lang/rfcs/blob/master/text/1422-pub-restricted.md
5747[RFC 1665]: https://github.com/rust-lang/rfcs/blob/master/text/1665-windows-subsystem.md
5748[`Child::try_wait`]: https://doc.rust-lang.org/std/process/struct.Child.html#method.try_wait
5749[`HashMap::retain`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.retain
5750[`HashSet::retain`]: https://doc.rust-lang.org/std/collections/struct.HashSet.html#method.retain
5751[`PeekMut::pop`]: https://doc.rust-lang.org/std/collections/binary_heap/struct.PeekMut.html#method.pop
5752[`TcpStream::peek`]: https://doc.rust-lang.org/std/net/struct.TcpStream.html#method.peek
5753[`UdpSocket::peek_from`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html#method.peek_from
5754[`UdpSocket::peek`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html#method.peek
5755[cargo/3842]: https://github.com/rust-lang/cargo/pull/3842
5756[cargo/3847]: https://github.com/rust-lang/cargo/pull/3847
5757[cargo/3885]: https://github.com/rust-lang/cargo/pull/3885
5758[cargo/3901]: https://github.com/rust-lang/cargo/pull/3901
5759[cargo/3952]: https://github.com/rust-lang/cargo/pull/3952
5760
5761
5762Version 1.17.0 (2017-04-27)
5763===========================
5764
5765Language
5766--------
5767
5768* [The lifetime of statics and consts defaults to `'static`][39265]. [RFC 1623]
5769* [Fields of structs may be initialized without duplicating the field/variable
5770 names][39761]. [RFC 1682]
5771* [`Self` may be included in the `where` clause of `impls`][38864]. [RFC 1647]
5772* [When coercing to an unsized type lifetimes must be equal][40319]. That is,
5773 there is no subtyping between `T` and `U` when `T: Unsize<U>`. For example,
5774 coercing `&mut [&'a X; N]` to `&mut [&'b X]` requires `'a` be equal to
5775 `'b`. Soundness fix.
5776* [Values passed to the indexing operator, `[]`, automatically coerce][40166]
5777* [Static variables may contain references to other statics][40027]
5778
5779Compiler
5780--------
5781
5782* [Exit quickly on only `--emit dep-info`][40336]
5783* [Make `-C relocation-model` more correctly determine whether the linker
5784 creates a position-independent executable][40245]
5785* [Add `-C overflow-checks` to directly control whether integer overflow
5786 panics][40037]
5787* [The rustc type checker now checks items on demand instead of in a single
5788 in-order pass][40008]. This is mostly an internal refactoring in support of
5789 future work, including incremental type checking, but also resolves [RFC
5790 1647], allowing `Self` to appear in `impl` `where` clauses.
5791* [Optimize vtable loads][39995]
5792* [Turn off vectorization for Emscripten targets][39990]
5793* [Provide suggestions for unknown macros imported with `use`][39953]
5794* [Fix ICEs in path resolution][39939]
5795* [Strip exception handling code on Emscripten when `panic=abort`][39193]
5796* [Add clearer error message using `&str + &str`][39116]
5797
5798Stabilized APIs
5799---------------
5800
5801* [`Arc::into_raw`]
5802* [`Arc::from_raw`]
5803* [`Arc::ptr_eq`]
5804* [`Rc::into_raw`]
5805* [`Rc::from_raw`]
5806* [`Rc::ptr_eq`]
5807* [`Ordering::then`]
5808* [`Ordering::then_with`]
5809* [`BTreeMap::range`]
5810* [`BTreeMap::range_mut`]
5811* [`collections::Bound`]
5812* [`process::abort`]
5813* [`ptr::read_unaligned`]
5814* [`ptr::write_unaligned`]
5815* [`Result::expect_err`]
5816* [`Cell::swap`]
5817* [`Cell::replace`]
5818* [`Cell::into_inner`]
5819* [`Cell::take`]
5820
5821Libraries
5822---------
5823
5824* [`BTreeMap` and `BTreeSet` can iterate over ranges][27787]
5825* [`Cell` can store non-`Copy` types][39793]. [RFC 1651]
5826* [`String` implements `FromIterator<&char>`][40028]
5827* `Box` [implements][40009] a number of new conversions:
5828 `From<Box<str>> for String`,
5829 `From<Box<[T]>> for Vec<T>`,
5830 `From<Box<CStr>> for CString`,
5831 `From<Box<OsStr>> for OsString`,
5832 `From<Box<Path>> for PathBuf`,
5833 `Into<Box<str>> for String`,
5834 `Into<Box<[T]>> for Vec<T>`,
5835 `Into<Box<CStr>> for CString`,
5836 `Into<Box<OsStr>> for OsString`,
5837 `Into<Box<Path>> for PathBuf`,
5838 `Default for Box<str>`,
5839 `Default for Box<CStr>`,
5840 `Default for Box<OsStr>`,
5841 `From<&CStr> for Box<CStr>`,
5842 `From<&OsStr> for Box<OsStr>`,
5843 `From<&Path> for Box<Path>`
5844* [`ffi::FromBytesWithNulError` implements `Error` and `Display`][39960]
5845* [Specialize `PartialOrd<A> for [A] where A: Ord`][39642]
5846* [Slightly optimize `slice::sort`][39538]
5847* [Add `ToString` trait specialization for `Cow<'a, str>` and `String`][39440]
5848* [`Box<[T]>` implements `From<&[T]> where T: Copy`,
5849 `Box<str>` implements `From<&str>`][39438]
5850* [`IpAddr` implements `From` for various arrays. `SocketAddr` implements
5851 `From<(I, u16)> where I: Into<IpAddr>`][39372]
5852* [`format!` estimates the needed capacity before writing a string][39356]
5853* [Support unprivileged symlink creation in Windows][38921]
5854* [`PathBuf` implements `Default`][38764]
5855* [Implement `PartialEq<[A]>` for `VecDeque<A>`][38661]
5856* [`HashMap` resizes adaptively][38368] to guard against DOS attacks
5857 and poor hash functions.
5858
5859Cargo
5860-----
5861
5862* [Add `cargo check --all`][cargo/3731]
5863* [Add an option to ignore SSL revocation checking][cargo/3699]
5864* [Add `cargo run --package`][cargo/3691]
5865* [Add `required_features`][cargo/3667]
5866* [Assume `build.rs` is a build script][cargo/3664]
5867* [Find workspace via `workspace_root` link in containing member][cargo/3562]
5868
5869Misc
5870----
5871
5872* [Documentation is rendered with mdbook instead of the obsolete, in-tree
5873 `rustbook`][39633]
5874* [The "Unstable Book" documents nightly-only features][ubook]
5875* [Improve the style of the sidebar in rustdoc output][40265]
5876* [Configure build correctly on 64-bit CPU's with the armhf ABI][40261]
5877* [Fix MSP430 breakage due to `i128`][40257]
5878* [Preliminary Solaris/SPARCv9 support][39903]
5879* [`rustc` is linked statically on Windows MSVC targets][39837], allowing it to
5880 run without installing the MSVC runtime.
5881* [`rustdoc --test` includes file names in test names][39788]
5882* This release includes builds of `std` for `sparc64-unknown-linux-gnu`,
5883 `aarch64-unknown-linux-fuchsia`, and `x86_64-unknown-linux-fuchsia`.
5884* [Initial support for `aarch64-unknown-freebsd`][39491]
5885* [Initial support for `i686-unknown-netbsd`][39426]
5886* [This release no longer includes the old makefile build system][39431]. Rust
5887 is built with a custom build system, written in Rust, and with Cargo.
5888* [Add Debug implementations for libcollection structs][39002]
5889* [`TypeId` implements `PartialOrd` and `Ord`][38981]
5890* [`--test-threads=0` produces an error][38945]
5891* [`rustup` installs documentation by default][40526]
5892* [The Rust source includes NatVis visualizations][39843]. These can be used by
5893 WinDbg and Visual Studio to improve the debugging experience.
5894
5895Compatibility Notes
5896-------------------
5897
5898* [Rust 1.17 does not correctly detect the MSVC 2017 linker][38584]. As a
5899 workaround, either use MSVC 2015 or run vcvars.bat.
5900* [When coercing to an unsized type lifetimes must be equal][40319]. That is,
5901 disallow subtyping between `T` and `U` when `T: Unsize<U>`, e.g. coercing
5902 `&mut [&'a X; N]` to `&mut [&'b X]` requires `'a` be equal to `'b`. Soundness
5903 fix.
5904* [`format!` and `Display::to_string` panic if an underlying formatting
5905 implementation returns an error][40117]. Previously the error was silently
5906 ignored. It is incorrect for `write_fmt` to return an error when writing
5907 to a string.
5908* [In-tree crates are verified to be unstable][39851]. Previously, some minor
5909 crates were marked stable and could be accessed from the stable toolchain.
5910* [Rust git source no longer includes vendored crates][39728]. Those that need
5911 to build with vendored crates should build from release tarballs.
5912* [Fix inert attributes from `proc_macro_derives`][39572]
5913* [During crate resolution, rustc prefers a crate in the sysroot if two crates
5914 are otherwise identical][39518]. Unlikely to be encountered outside the Rust
5915 build system.
5916* [Fixed bugs around how type inference interacts with dead-code][39485]. The
5917 existing code generally ignores the type of dead-code unless a type-hint is
5918 provided; this can cause surprising inference interactions particularly around
5919 defaulting. The new code uniformly ignores the result type of dead-code.
5920* [Tuple-struct constructors with private fields are no longer visible][38932]
5921* [Lifetime parameters that do not appear in the arguments are now considered
5922 early-bound][38897], resolving a soundness bug (#[32330]). The
5923 `hr_lifetime_in_assoc_type` future-compatibility lint has been in effect since
5924 April of 2016.
5925* [rustdoc: fix doctests with non-feature crate attributes][38161]
5926* [Make transmuting from fn item types to pointer-sized types a hard
5927 error][34198]
5928
5929[27787]: https://github.com/rust-lang/rust/issues/27787
5930[32330]: https://github.com/rust-lang/rust/issues/32330
5931[34198]: https://github.com/rust-lang/rust/pull/34198
5932[38161]: https://github.com/rust-lang/rust/pull/38161
5933[38368]: https://github.com/rust-lang/rust/pull/38368
5934[38584]: https://github.com/rust-lang/rust/issues/38584
5935[38661]: https://github.com/rust-lang/rust/pull/38661
5936[38764]: https://github.com/rust-lang/rust/pull/38764
5937[38864]: https://github.com/rust-lang/rust/issues/38864
5938[38897]: https://github.com/rust-lang/rust/pull/38897
5939[38921]: https://github.com/rust-lang/rust/pull/38921
5940[38932]: https://github.com/rust-lang/rust/pull/38932
5941[38945]: https://github.com/rust-lang/rust/pull/38945
5942[38981]: https://github.com/rust-lang/rust/pull/38981
5943[39002]: https://github.com/rust-lang/rust/pull/39002
5944[39116]: https://github.com/rust-lang/rust/pull/39116
5945[39193]: https://github.com/rust-lang/rust/pull/39193
5946[39265]: https://github.com/rust-lang/rust/pull/39265
5947[39356]: https://github.com/rust-lang/rust/pull/39356
5948[39372]: https://github.com/rust-lang/rust/pull/39372
5949[39426]: https://github.com/rust-lang/rust/pull/39426
5950[39431]: https://github.com/rust-lang/rust/pull/39431
5951[39438]: https://github.com/rust-lang/rust/pull/39438
5952[39440]: https://github.com/rust-lang/rust/pull/39440
5953[39485]: https://github.com/rust-lang/rust/pull/39485
5954[39491]: https://github.com/rust-lang/rust/pull/39491
5955[39518]: https://github.com/rust-lang/rust/pull/39518
5956[39538]: https://github.com/rust-lang/rust/pull/39538
5957[39572]: https://github.com/rust-lang/rust/pull/39572
5958[39633]: https://github.com/rust-lang/rust/pull/39633
5959[39642]: https://github.com/rust-lang/rust/pull/39642
5960[39728]: https://github.com/rust-lang/rust/pull/39728
5961[39761]: https://github.com/rust-lang/rust/pull/39761
5962[39788]: https://github.com/rust-lang/rust/pull/39788
5963[39793]: https://github.com/rust-lang/rust/pull/39793
5964[39837]: https://github.com/rust-lang/rust/pull/39837
5965[39843]: https://github.com/rust-lang/rust/pull/39843
5966[39851]: https://github.com/rust-lang/rust/pull/39851
5967[39903]: https://github.com/rust-lang/rust/pull/39903
5968[39939]: https://github.com/rust-lang/rust/pull/39939
5969[39953]: https://github.com/rust-lang/rust/pull/39953
5970[39960]: https://github.com/rust-lang/rust/pull/39960
5971[39990]: https://github.com/rust-lang/rust/pull/39990
5972[39995]: https://github.com/rust-lang/rust/pull/39995
5973[40008]: https://github.com/rust-lang/rust/pull/40008
5974[40009]: https://github.com/rust-lang/rust/pull/40009
5975[40027]: https://github.com/rust-lang/rust/pull/40027
5976[40028]: https://github.com/rust-lang/rust/pull/40028
5977[40037]: https://github.com/rust-lang/rust/pull/40037
5978[40117]: https://github.com/rust-lang/rust/pull/40117
5979[40166]: https://github.com/rust-lang/rust/pull/40166
5980[40245]: https://github.com/rust-lang/rust/pull/40245
5981[40257]: https://github.com/rust-lang/rust/pull/40257
5982[40261]: https://github.com/rust-lang/rust/pull/40261
5983[40265]: https://github.com/rust-lang/rust/pull/40265
5984[40319]: https://github.com/rust-lang/rust/pull/40319
5985[40336]: https://github.com/rust-lang/rust/pull/40336
5986[40526]: https://github.com/rust-lang/rust/pull/40526
5987[RFC 1623]: https://github.com/rust-lang/rfcs/blob/master/text/1623-static.md
5988[RFC 1647]: https://github.com/rust-lang/rfcs/blob/master/text/1647-allow-self-in-where-clauses.md
5989[RFC 1651]: https://github.com/rust-lang/rfcs/blob/master/text/1651-movecell.md
5990[RFC 1682]: https://github.com/rust-lang/rfcs/blob/master/text/1682-field-init-shorthand.md
5991[`Arc::from_raw`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.from_raw
5992[`Arc::into_raw`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.into_raw
5993[`Arc::ptr_eq`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.ptr_eq
5994[`BTreeMap::range_mut`]: https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.range_mut
5995[`BTreeMap::range`]: https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.range
5996[`Cell::into_inner`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.into_inner
5997[`Cell::replace`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.replace
5998[`Cell::swap`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.swap
5999[`Cell::take`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.take
6000[`Ordering::then_with`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then_with
6001[`Ordering::then`]: https://doc.rust-lang.org/std/cmp/enum.Ordering.html#method.then
6002[`Rc::from_raw`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.from_raw
6003[`Rc::into_raw`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.into_raw
6004[`Rc::ptr_eq`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.ptr_eq
6005[`Result::expect_err`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.expect_err
6006[`collections::Bound`]: https://doc.rust-lang.org/std/collections/enum.Bound.html
6007[`process::abort`]: https://doc.rust-lang.org/std/process/fn.abort.html
6008[`ptr::read_unaligned`]: https://doc.rust-lang.org/std/ptr/fn.read_unaligned.html
6009[`ptr::write_unaligned`]: https://doc.rust-lang.org/std/ptr/fn.write_unaligned.html
6010[cargo/3562]: https://github.com/rust-lang/cargo/pull/3562
6011[cargo/3664]: https://github.com/rust-lang/cargo/pull/3664
6012[cargo/3667]: https://github.com/rust-lang/cargo/pull/3667
6013[cargo/3691]: https://github.com/rust-lang/cargo/pull/3691
6014[cargo/3699]: https://github.com/rust-lang/cargo/pull/3699
6015[cargo/3731]: https://github.com/rust-lang/cargo/pull/3731
6016[mdbook]: https://crates.io/crates/mdbook
6017[ubook]: https://doc.rust-lang.org/unstable-book/
6018
6019
32a655c1
SL
6020Version 1.16.0 (2017-03-16)
6021===========================
6022
6023Language
6024--------
6025
32a655c1
SL
6026* [The compiler's `dead_code` lint now accounts for type aliases][38051].
6027* [Uninhabitable enums (those without any variants) no longer permit wildcard
6028 match patterns][38069]
6029* [Clean up semantics of `self` in an import list][38313]
6030* [`Self` may appear in `impl` headers][38920]
6031* [`Self` may appear in struct expressions][39282]
6032
6033Compiler
6034--------
6035
6036* [`rustc` now supports `--emit=metadata`, which causes rustc to emit
6037 a `.rmeta` file containing only crate metadata][38571]. This can be
6038 used by tools like the Rust Language Service to perform
6039 metadata-only builds.
6040* [Levenshtein based typo suggestions now work in most places, while
6041 previously they worked only for fields and sometimes for local
6042 variables][38927]. Together with the overhaul of "no
6043 resolution"/"unexpected resolution" errors (#[38154]) they result in
6044 large and systematic improvement in resolution diagnostics.
6045* [Fix `transmute::<T, U>` where `T` requires a bigger alignment than
6046 `U`][38670]
6047* [rustc: use -Xlinker when specifying an rpath with ',' in it][38798]
6048* [`rustc` no longer attempts to provide "consider using an explicit
6049 lifetime" suggestions][37057]. They were inaccurate.
6050
6051Stabilized APIs
6052---------------
6053
6054* [`VecDeque::truncate`]
6055* [`VecDeque::resize`]
6056* [`String::insert_str`]
6057* [`Duration::checked_add`]
6058* [`Duration::checked_sub`]
6059* [`Duration::checked_div`]
6060* [`Duration::checked_mul`]
6061* [`str::replacen`]
6062* [`str::repeat`]
6063* [`SocketAddr::is_ipv4`]
6064* [`SocketAddr::is_ipv6`]
6065* [`IpAddr::is_ipv4`]
6066* [`IpAddr::is_ipv6`]
6067* [`Vec::dedup_by`]
6068* [`Vec::dedup_by_key`]
6069* [`Result::unwrap_or_default`]
6070* [`<*const T>::wrapping_offset`]
6071* [`<*mut T>::wrapping_offset`]
6072* `CommandExt::creation_flags`
6073* [`File::set_permissions`]
6074* [`String::split_off`]
6075
6076Libraries
6077---------
6078
6079* [`[T]::binary_search` and `[T]::binary_search_by_key` now take
6080 their argument by `Borrow` parameter][37761]
6081* [All public types in std implement `Debug`][38006]
6082* [`IpAddr` implements `From<Ipv4Addr>` and `From<Ipv6Addr>`][38327]
6083* [`Ipv6Addr` implements `From<[u16; 8]>`][38131]
6084* [Ctrl-Z returns from `Stdin.read()` when reading from the console on
6085 Windows][38274]
6086* [std: Fix partial writes in `LineWriter`][38062]
6087* [std: Clamp max read/write sizes on Unix][38062]
6088* [Use more specific panic message for `&str` slicing errors][38066]
6089* [`TcpListener::set_only_v6` is deprecated][38304]. This
6090 functionality cannot be achieved in std currently.
6091* [`writeln!`, like `println!`, now accepts a form with no string
6092 or formatting arguments, to just print a newline][38469]
6093* [Implement `iter::Sum` and `iter::Product` for `Result`][38580]
6094* [Reduce the size of static data in `std_unicode::tables`][38781]
6095* [`char::EscapeDebug`, `EscapeDefault`, `EscapeUnicode`,
6096 `CaseMappingIter`, `ToLowercase`, `ToUppercase`, implement
6097 `Display`][38909]
6098* [`Duration` implements `Sum`][38712]
6099* [`String` implements `ToSocketAddrs`][39048]
6100
6101Cargo
6102-----
6103
6104* [The `cargo check` command does a type check of a project without
6105 building it][cargo/3296]
6106* [crates.io will display CI badges from Travis and AppVeyor, if
6107 specified in Cargo.toml][cargo/3546]
6108* [crates.io will display categories listed in Cargo.toml][cargo/3301]
6109* [Compilation profiles accept integer values for `debug`, in addition
6110 to `true` and `false`. These are passed to `rustc` as the value to
6111 `-C debuginfo`][cargo/3534]
6112* [Implement `cargo --version --verbose`][cargo/3604]
6113* [All builds now output 'dep-info' build dependencies compatible with
6114 make and ninja][cargo/3557]
6115* [Build all workspace members with `build --all`][cargo/3511]
6116* [Document all workspace members with `doc --all`][cargo/3515]
6117* [Path deps outside workspace are not members][cargo/3443]
6118
6119Misc
6120----
6121
6122* [`rustdoc` has a `--sysroot` argument that, like `rustc`, specifies
6123 the path to the Rust implementation][38589]
6124* [The `armv7-linux-androideabi` target no longer enables NEON
6125 extensions, per Google's ABI guide][38413]
6126* [The stock standard library can be compiled for Redox OS][38401]
6127* [Rust has initial SPARC support][38726]. Tier 3. No builds
6128 available.
6129* [Rust has experimental support for Nvidia PTX][38559]. Tier 3. No
6130 builds available.
6131* [Fix backtraces on i686-pc-windows-gnu by disabling FPO][39379]
6132
6133Compatibility Notes
6134-------------------
6135
6136* [Uninhabitable enums (those without any variants) no longer permit wildcard
6137 match patterns][38069]
6138* In this release, references to uninhabited types can not be
6139 pattern-matched. This was accidentally allowed in 1.15.
6140* [The compiler's `dead_code` lint now accounts for type aliases][38051].
6141* [Ctrl-Z returns from `Stdin.read()` when reading from the console on
6142 Windows][38274]
6143* [Clean up semantics of `self` in an import list][38313]
3b2f2976
XL
6144* Reimplemented lifetime elision. This change was almost entirely compatible
6145 with existing code, but it did close a number of small bugs and loopholes,
6146 as well as being more accepting in some other [cases][41105].
32a655c1
SL
6147
6148[37057]: https://github.com/rust-lang/rust/pull/37057
6149[37761]: https://github.com/rust-lang/rust/pull/37761
6150[38006]: https://github.com/rust-lang/rust/pull/38006
6151[38051]: https://github.com/rust-lang/rust/pull/38051
6152[38062]: https://github.com/rust-lang/rust/pull/38062
6153[38062]: https://github.com/rust-lang/rust/pull/38622
6154[38066]: https://github.com/rust-lang/rust/pull/38066
6155[38069]: https://github.com/rust-lang/rust/pull/38069
6156[38131]: https://github.com/rust-lang/rust/pull/38131
6157[38154]: https://github.com/rust-lang/rust/pull/38154
6158[38274]: https://github.com/rust-lang/rust/pull/38274
6159[38304]: https://github.com/rust-lang/rust/pull/38304
6160[38313]: https://github.com/rust-lang/rust/pull/38313
6161[38314]: https://github.com/rust-lang/rust/pull/38314
6162[38327]: https://github.com/rust-lang/rust/pull/38327
6163[38401]: https://github.com/rust-lang/rust/pull/38401
6164[38413]: https://github.com/rust-lang/rust/pull/38413
6165[38469]: https://github.com/rust-lang/rust/pull/38469
6166[38559]: https://github.com/rust-lang/rust/pull/38559
6167[38571]: https://github.com/rust-lang/rust/pull/38571
6168[38580]: https://github.com/rust-lang/rust/pull/38580
6169[38589]: https://github.com/rust-lang/rust/pull/38589
6170[38670]: https://github.com/rust-lang/rust/pull/38670
6171[38712]: https://github.com/rust-lang/rust/pull/38712
6172[38726]: https://github.com/rust-lang/rust/pull/38726
6173[38781]: https://github.com/rust-lang/rust/pull/38781
6174[38798]: https://github.com/rust-lang/rust/pull/38798
6175[38909]: https://github.com/rust-lang/rust/pull/38909
6176[38920]: https://github.com/rust-lang/rust/pull/38920
6177[38927]: https://github.com/rust-lang/rust/pull/38927
6178[39048]: https://github.com/rust-lang/rust/pull/39048
6179[39282]: https://github.com/rust-lang/rust/pull/39282
6180[39379]: https://github.com/rust-lang/rust/pull/39379
3b2f2976 6181[41105]: https://github.com/rust-lang/rust/issues/41105
32a655c1
SL
6182[`<*const T>::wrapping_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset
6183[`<*mut T>::wrapping_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.wrapping_offset
6184[`Duration::checked_add`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_add
6185[`Duration::checked_div`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_div
6186[`Duration::checked_mul`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_mul
6187[`Duration::checked_sub`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.checked_sub
6188[`File::set_permissions`]: https://doc.rust-lang.org/std/fs/struct.File.html#method.set_permissions
6189[`IpAddr::is_ipv4`]: https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_ipv4
6190[`IpAddr::is_ipv6`]: https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_ipv6
6191[`Result::unwrap_or_default`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.unwrap_or_default
6192[`SocketAddr::is_ipv4`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv4
6193[`SocketAddr::is_ipv6`]: https://doc.rust-lang.org/std/net/enum.SocketAddr.html#method.is_ipv6
6194[`String::insert_str`]: https://doc.rust-lang.org/std/string/struct.String.html#method.insert_str
6195[`String::split_off`]: https://doc.rust-lang.org/std/string/struct.String.html#method.split_off
6196[`Vec::dedup_by_key`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by_key
6197[`Vec::dedup_by`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.dedup_by
6198[`VecDeque::resize`]: https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.resize
6199[`VecDeque::truncate`]: https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.truncate
6200[`str::repeat`]: https://doc.rust-lang.org/std/primitive.str.html#method.repeat
6201[`str::replacen`]: https://doc.rust-lang.org/std/primitive.str.html#method.replacen
6202[cargo/3296]: https://github.com/rust-lang/cargo/pull/3296
6203[cargo/3301]: https://github.com/rust-lang/cargo/pull/3301
6204[cargo/3443]: https://github.com/rust-lang/cargo/pull/3443
6205[cargo/3511]: https://github.com/rust-lang/cargo/pull/3511
6206[cargo/3515]: https://github.com/rust-lang/cargo/pull/3515
6207[cargo/3534]: https://github.com/rust-lang/cargo/pull/3534
6208[cargo/3546]: https://github.com/rust-lang/cargo/pull/3546
6209[cargo/3557]: https://github.com/rust-lang/cargo/pull/3557
6210[cargo/3604]: https://github.com/rust-lang/cargo/pull/3604
6211[RFC 1623]: https://github.com/rust-lang/rfcs/blob/master/text/1623-static.md
6212
6213
e81b0574
SL
6214Version 1.15.1 (2017-02-09)
6215===========================
6216
6217* [Fix IntoIter::as_mut_slice's signature][39466]
6218* [Compile compiler builtins with `-fPIC` on 32-bit platforms][39523]
6219
6220[39466]: https://github.com/rust-lang/rust/pull/39466
6221[39523]: https://github.com/rust-lang/rust/pull/39523
6222
6223
476ff2be
SL
6224Version 1.15.0 (2017-02-02)
6225===========================
6226
6227Language
6228--------
6229
6230* Basic procedural macros allowing custom `#[derive]`, aka "macros 1.1", are
6231 stable. This allows popular code-generating crates like Serde and Diesel to
6232 work ergonomically. [RFC 1681].
6233* [Tuple structs may be empty. Unary and empty tuple structs may be instantiated
6234 with curly braces][36868]. Part of [RFC 1506].
6235* [A number of minor changes to name resolution have been activated][37127].
6236 They add up to more consistent semantics, allowing for future evolution of
6237 Rust macros. Specified in [RFC 1560], see its section on ["changes"] for
6238 details of what is different. The breaking changes here have been transitioned
6239 through the [`legacy_imports`] lint since 1.14, with no known regressions.
6240* [In `macro_rules`, `path` fragments can now be parsed as type parameter
6241 bounds][38279]
6242* [`?Sized` can be used in `where` clauses][37791]
6243* [There is now a limit on the size of monomorphized types and it can be
6244 modified with the `#![type_size_limit]` crate attribute, similarly to
6245 the `#![recursion_limit]` attribute][37789]
6246
6247Compiler
6248--------
6249
6250* [On Windows, the compiler will apply dllimport attributes when linking to
6251 extern functions][37973]. Additional attributes and flags can control which
6252 library kind is linked and its name. [RFC 1717].
6253* [Rust-ABI symbols are no longer exported from cdylibs][38117]
6254* [The `--test` flag works with procedural macro crates][38107]
6255* [Fix `extern "aapcs" fn` ABI][37814]
6256* [The `-C no-stack-check` flag is deprecated][37636]. It does nothing.
6257* [The `format!` expander recognizes incorrect `printf` and shell-style
6258 formatting directives and suggests the correct format][37613].
6259* [Only report one error for all unused imports in an import list][37456]
6260
6261Compiler Performance
6262--------------------
6263
6264* [Avoid unnecessary `mk_ty` calls in `Ty::super_fold_with`][37705]
6265* [Avoid more unnecessary `mk_ty` calls in `Ty::super_fold_with`][37979]
6266* [Don't clone in `UnificationTable::probe`][37848]
6267* [Remove `scope_auxiliary` to cut RSS by 10%][37764]
6268* [Use small vectors in type walker][37760]
6269* [Macro expansion performance was improved][37701]
6270* [Change `HirVec<P<T>>` to `HirVec<T>` in `hir::Expr`][37642]
6271* [Replace FNV with a faster hash function][37229]
6272
6273Stabilized APIs
6274---------------
6275
6276* [`std::iter::Iterator::min_by`]
6277* [`std::iter::Iterator::max_by`]
6278* [`std::os::*::fs::FileExt`]
6279* [`std::sync::atomic::Atomic*::get_mut`]
6280* [`std::sync::atomic::Atomic*::into_inner`]
6281* [`std::vec::IntoIter::as_slice`]
6282* [`std::vec::IntoIter::as_mut_slice`]
6283* [`std::sync::mpsc::Receiver::try_iter`]
6284* [`std::os::unix::process::CommandExt::before_exec`]
6285* [`std::rc::Rc::strong_count`]
6286* [`std::rc::Rc::weak_count`]
6287* [`std::sync::Arc::strong_count`]
6288* [`std::sync::Arc::weak_count`]
6289* [`std::char::encode_utf8`]
6290* [`std::char::encode_utf16`]
6291* [`std::cell::Ref::clone`]
6292* [`std::io::Take::into_inner`]
6293
6294Libraries
6295---------
6296
6297* [The standard sorting algorithm has been rewritten for dramatic performance
6298 improvements][38192]. It is a hybrid merge sort, drawing influences from
6299 Timsort. Previously it was a naive merge sort.
6300* [`Iterator::nth` no longer has a `Sized` bound][38134]
6301* [`Extend<&T>` is specialized for `Vec` where `T: Copy`][38182] to improve
6302 performance.
6303* [`chars().count()` is much faster][37888] and so are [`chars().last()`
6304 and `char_indices().last()`][37882]
6305* [Fix ARM Objective-C ABI in `std::env::args`][38146]
6306* [Chinese characters display correctly in `fmt::Debug`][37855]
6307* [Derive `Default` for `Duration`][37699]
6308* [Support creation of anonymous pipes on WinXP/2k][37677]
6309* [`mpsc::RecvTimeoutError` implements `Error`][37527]
6310* [Don't pass overlapped handles to processes][38835]
6311
6312Cargo
6313-----
6314
6315* [In this release, Cargo build scripts no longer have access to the `OUT_DIR`
6316 environment variable at build time via `env!("OUT_DIR")`][cargo/3368]. They
6317 should instead check the variable at runtime with `std::env`. That the value
6318 was set at build time was a bug, and incorrect when cross-compiling. This
6319 change is known to cause breakage.
6320* [Add `--all` flag to `cargo test`][cargo/3221]
6321* [Compile statically against the MSVC CRT][cargo/3363]
6322* [Mix feature flags into fingerprint/metadata shorthash][cargo/3102]
6323* [Link OpenSSL statically on OSX][cargo/3311]
6324* [Apply new fingerprinting to build dir outputs][cargo/3310]
6325* [Test for bad path overrides with summaries][cargo/3336]
6326* [Require `cargo install --vers` to take a semver version][cargo/3338]
6327* [Fix retrying crate downloads for network errors][cargo/3348]
6328* [Implement string lookup for `build.rustflags` config key][cargo/3356]
6329* [Emit more info on --message-format=json][cargo/3319]
6330* [Assume `build.rs` in the same directory as `Cargo.toml` is a build script][cargo/3361]
6331* [Don't ignore errors in workspace manifest][cargo/3409]
6332* [Fix `--message-format JSON` when rustc emits non-JSON warnings][cargo/3410]
6333
6334Tooling
6335-------
6336
6337* [Test runners (binaries built with `--test`) now support a `--list` argument
6338 that lists the tests it contains][38185]
6339* [Test runners now support a `--exact` argument that makes the test filter
6340 match exactly, instead of matching only a substring of the test name][38181]
6341* [rustdoc supports a `--playground-url` flag][37763]
6342* [rustdoc provides more details about `#[should_panic]` errors][37749]
6343
6344Misc
6345----
6346
6347* [The Rust build system is now written in Rust][37817]. The Makefiles may
6348 continue to be used in this release by passing `--disable-rustbuild` to the
6349 configure script, but they will be deleted soon. Note that the new build
6350 system uses a different on-disk layout that will likely affect any scripts
6351 building Rust.
6352* [Rust supports i686-unknown-openbsd][38086]. Tier 3 support. No testing or
6353 releases.
6354* [Rust supports the MSP430][37627]. Tier 3 support. No testing or releases.
6355* [Rust supports the ARMv5TE architecture][37615]. Tier 3 support. No testing or
6356 releases.
6357
6358Compatibility Notes
6359-------------------
6360
6361* [A number of minor changes to name resolution have been activated][37127].
6362 They add up to more consistent semantics, allowing for future evolution of
6363 Rust macros. Specified in [RFC 1560], see its section on ["changes"] for
6364 details of what is different. The breaking changes here have been transitioned
6365 through the [`legacy_imports`] lint since 1.14, with no known regressions.
6366* [In this release, Cargo build scripts no longer have access to the `OUT_DIR`
6367 environment variable at build time via `env!("OUT_DIR")`][cargo/3368]. They
6368 should instead check the variable at runtime with `std::env`. That the value
6369 was set at build time was a bug, and incorrect when cross-compiling. This
6370 change is known to cause breakage.
6371* [Higher-ranked lifetimes are no longer allowed to appear _only_ in associated
6372 types][33685]. The [`hr_lifetime_in_assoc_type` lint] has been a warning since
6373 1.10 and is now an error by default. It will become a hard error in the near
6374 future.
6375* [The semantics relating modules to file system directories are changing in
6376 minor ways][37602]. This is captured in the new `legacy_directory_ownership`
6377 lint, which is a warning in this release, and will become a hard error in the
6378 future.
6379* [Rust-ABI symbols are no longer exported from cdylibs][38117]
6380* [Once `Peekable` peeks a `None` it will return that `None` without re-querying
6381 the underlying iterator][37834]
6382
6383["changes"]: https://github.com/rust-lang/rfcs/blob/master/text/1560-name-resolution.md#changes-to-name-resolution-rules
6384[33685]: https://github.com/rust-lang/rust/issues/33685
6385[36868]: https://github.com/rust-lang/rust/pull/36868
6386[37127]: https://github.com/rust-lang/rust/pull/37127
6387[37229]: https://github.com/rust-lang/rust/pull/37229
6388[37456]: https://github.com/rust-lang/rust/pull/37456
6389[37527]: https://github.com/rust-lang/rust/pull/37527
6390[37602]: https://github.com/rust-lang/rust/pull/37602
6391[37613]: https://github.com/rust-lang/rust/pull/37613
6392[37615]: https://github.com/rust-lang/rust/pull/37615
6393[37636]: https://github.com/rust-lang/rust/pull/37636
32a655c1 6394[37627]: https://github.com/rust-lang/rust/pull/37627
476ff2be
SL
6395[37642]: https://github.com/rust-lang/rust/pull/37642
6396[37677]: https://github.com/rust-lang/rust/pull/37677
6397[37699]: https://github.com/rust-lang/rust/pull/37699
6398[37701]: https://github.com/rust-lang/rust/pull/37701
6399[37705]: https://github.com/rust-lang/rust/pull/37705
6400[37749]: https://github.com/rust-lang/rust/pull/37749
6401[37760]: https://github.com/rust-lang/rust/pull/37760
6402[37763]: https://github.com/rust-lang/rust/pull/37763
6403[37764]: https://github.com/rust-lang/rust/pull/37764
6404[37789]: https://github.com/rust-lang/rust/pull/37789
6405[37791]: https://github.com/rust-lang/rust/pull/37791
6406[37814]: https://github.com/rust-lang/rust/pull/37814
6407[37817]: https://github.com/rust-lang/rust/pull/37817
6408[37834]: https://github.com/rust-lang/rust/pull/37834
6409[37848]: https://github.com/rust-lang/rust/pull/37848
6410[37855]: https://github.com/rust-lang/rust/pull/37855
6411[37882]: https://github.com/rust-lang/rust/pull/37882
6412[37888]: https://github.com/rust-lang/rust/pull/37888
6413[37973]: https://github.com/rust-lang/rust/pull/37973
6414[37979]: https://github.com/rust-lang/rust/pull/37979
6415[38086]: https://github.com/rust-lang/rust/pull/38086
6416[38107]: https://github.com/rust-lang/rust/pull/38107
6417[38117]: https://github.com/rust-lang/rust/pull/38117
6418[38134]: https://github.com/rust-lang/rust/pull/38134
6419[38146]: https://github.com/rust-lang/rust/pull/38146
6420[38181]: https://github.com/rust-lang/rust/pull/38181
6421[38182]: https://github.com/rust-lang/rust/pull/38182
6422[38185]: https://github.com/rust-lang/rust/pull/38185
6423[38192]: https://github.com/rust-lang/rust/pull/38192
6424[38279]: https://github.com/rust-lang/rust/pull/38279
6425[38835]: https://github.com/rust-lang/rust/pull/38835
6426[RFC 1492]: https://github.com/rust-lang/rfcs/blob/master/text/1492-dotdot-in-patterns.md
6427[RFC 1506]: https://github.com/rust-lang/rfcs/blob/master/text/1506-adt-kinds.md
6428[RFC 1560]: https://github.com/rust-lang/rfcs/blob/master/text/1560-name-resolution.md
6429[RFC 1681]: https://github.com/rust-lang/rfcs/blob/master/text/1681-macros-1.1.md
6430[RFC 1717]: https://github.com/rust-lang/rfcs/blob/master/text/1717-dllimport.md
6431[`hr_lifetime_in_assoc_type` lint]: https://github.com/rust-lang/rust/issues/33685
6432[`legacy_imports`]: https://github.com/rust-lang/rust/pull/38271
6433[cargo/3102]: https://github.com/rust-lang/cargo/pull/3102
6434[cargo/3221]: https://github.com/rust-lang/cargo/pull/3221
6435[cargo/3310]: https://github.com/rust-lang/cargo/pull/3310
6436[cargo/3311]: https://github.com/rust-lang/cargo/pull/3311
6437[cargo/3319]: https://github.com/rust-lang/cargo/pull/3319
6438[cargo/3336]: https://github.com/rust-lang/cargo/pull/3336
6439[cargo/3338]: https://github.com/rust-lang/cargo/pull/3338
6440[cargo/3348]: https://github.com/rust-lang/cargo/pull/3348
6441[cargo/3356]: https://github.com/rust-lang/cargo/pull/3356
6442[cargo/3361]: https://github.com/rust-lang/cargo/pull/3361
6443[cargo/3363]: https://github.com/rust-lang/cargo/pull/3363
6444[cargo/3368]: https://github.com/rust-lang/cargo/issues/3368
6445[cargo/3409]: https://github.com/rust-lang/cargo/pull/3409
6446[cargo/3410]: https://github.com/rust-lang/cargo/pull/3410
6447[`std::iter::Iterator::min_by`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.min_by
6448[`std::iter::Iterator::max_by`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.max_by
6449[`std::os::*::fs::FileExt`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html
6450[`std::sync::atomic::Atomic*::get_mut`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU8.html#method.get_mut
6451[`std::sync::atomic::Atomic*::into_inner`]: https://doc.rust-lang.org/std/sync/atomic/struct.AtomicU8.html#method.into_inner
6452[`std::vec::IntoIter::as_slice`]: https://doc.rust-lang.org/std/vec/struct.IntoIter.html#method.as_slice
6453[`std::vec::IntoIter::as_mut_slice`]: https://doc.rust-lang.org/std/vec/struct.IntoIter.html#method.as_mut_slice
6454[`std::sync::mpsc::Receiver::try_iter`]: https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.try_iter
6455[`std::os::unix::process::CommandExt::before_exec`]: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html#tymethod.before_exec
6456[`std::rc::Rc::strong_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.strong_count
6457[`std::rc::Rc::weak_count`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.weak_count
6458[`std::sync::Arc::strong_count`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.strong_count
6459[`std::sync::Arc::weak_count`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.weak_count
6460[`std::char::encode_utf8`]: https://doc.rust-lang.org/std/primitive.char.html#method.encode_utf8
6461[`std::char::encode_utf16`]: https://doc.rust-lang.org/std/primitive.char.html#method.encode_utf16
6462[`std::cell::Ref::clone`]: https://doc.rust-lang.org/std/cell/struct.Ref.html#method.clone
6463[`std::io::Take::into_inner`]: https://doc.rust-lang.org/std/io/struct.Take.html#method.into_inner
6464
6465
6466Version 1.14.0 (2016-12-22)
6467===========================
6468
6469Language
6470--------
6471
6472* [`..` matches multiple tuple fields in enum variants, structs
6473 and tuples][36843]. [RFC 1492].
6474* [Safe `fn` items can be coerced to `unsafe fn` pointers][37389]
6475* [`use *` and `use ::*` both glob-import from the crate root][37367]
6476* [It's now possible to call a `Vec<Box<Fn()>>` without explicit
6477 dereferencing][36822]
6478
6479Compiler
6480--------
6481
6482* [Mark enums with non-zero discriminant as non-zero][37224]
6483* [Lower-case `static mut` names are linted like other
6484 statics and consts][37162]
6485* [Fix ICE on some macros in const integer positions
6486 (e.g. `[u8; m!()]`)][36819]
6487* [Improve error message and snippet for "did you mean `x`"][36798]
6488* [Add a panic-strategy field to the target specification][36794]
6489* [Include LLVM version in `--version --verbose`][37200]
6490
6491Compile-time Optimizations
6492--------------------------
6493
6494* [Improve macro expansion performance][37569]
6495* [Shrink `Expr_::ExprInlineAsm`][37445]
6496* [Replace all uses of SHA-256 with BLAKE2b][37439]
6497* [Reduce the number of bytes hashed by `IchHasher`][37427]
6498* [Avoid more allocations when compiling html5ever][37373]
6499* [Use `SmallVector` in `CombineFields::instantiate`][37322]
6500* [Avoid some allocations in the macro parser][37318]
6501* [Use a faster deflate setting][37298]
6502* [Add `ArrayVec` and `AccumulateVec` to reduce heap allocations
6503 during interning of slices][37270]
6504* [Optimize `write_metadata`][37267]
6505* [Don't process obligation forest cycles when stalled][37231]
6506* [Avoid many `CrateConfig` clones][37161]
6507* [Optimize `Substs::super_fold_with`][37108]
6508* [Optimize `ObligationForest`'s `NodeState` handling][36993]
6509* [Speed up `plug_leaks`][36917]
6510
6511Libraries
6512---------
6513
6514* [`println!()`, with no arguments, prints newline][36825].
6515 Previously, an empty string was required to achieve the same.
6516* [`Wrapping` impls standard binary and unary operators, as well as
6517 the `Sum` and `Product` iterators][37356]
6518* [Implement `From<Cow<str>> for String` and `From<Cow<[T]>> for
6519 Vec<T>`][37326]
6520* [Improve `fold` performance for `chain`, `cloned`, `map`, and
6521 `VecDeque` iterators][37315]
6522* [Improve `SipHasher` performance on small values][37312]
6523* [Add Iterator trait TrustedLen to enable better FromIterator /
6524 Extend][37306]
6525* [Expand `.zip()` specialization to `.map()` and `.cloned()`][37230]
6526* [`ReadDir` implements `Debug`][37221]
6527* [Implement `RefUnwindSafe` for atomic types][37178]
6528* [Specialize `Vec::extend` to `Vec::extend_from_slice`][37094]
6529* [Avoid allocations in `Decoder::read_str`][37064]
6530* [`io::Error` implements `From<io::ErrorKind>`][37037]
6531* [Impl `Debug` for raw pointers to unsized data][36880]
6532* [Don't reuse `HashMap` random seeds][37470]
6533* [The internal memory layout of `HashMap` is more cache-friendly, for
6534 significant improvements in some operations][36692]
6535* [`HashMap` uses less memory on 32-bit architectures][36595]
6536* [Impl `Add<{str, Cow<str>}>` for `Cow<str>`][36430]
6537
6538Cargo
6539-----
6540
6541* [Expose rustc cfg values to build scripts][cargo/3243]
6542* [Allow cargo to work with read-only `CARGO_HOME`][cargo/3259]
6543* [Fix passing --features when testing multiple packages][cargo/3280]
6544* [Use a single profile set per workspace][cargo/3249]
6545* [Load `replace` sections from lock files][cargo/3220]
6546* [Ignore `panic` configuration for test/bench profiles][cargo/3175]
6547
6548Tooling
6549-------
6550
6551* [rustup is the recommended Rust installation method][1.14rustup]
6552* This release includes host (rustc) builds for Linux on MIPS, PowerPC, and
6553 S390x. These are [tier 2] platforms and may have major defects. Follow the
6554 instructions on the website to install, or add the targets to an existing
6555 installation with `rustup target add`. The new target triples are:
6556 - `mips-unknown-linux-gnu`
6557 - `mipsel-unknown-linux-gnu`
6558 - `mips64-unknown-linux-gnuabi64`
6559 - `mips64el-unknown-linux-gnuabi64 `
6560 - `powerpc-unknown-linux-gnu`
6561 - `powerpc64-unknown-linux-gnu`
6562 - `powerpc64le-unknown-linux-gnu`
6563 - `s390x-unknown-linux-gnu `
6564* This release includes target (std) builds for ARM Linux running MUSL
6565 libc. These are [tier 2] platforms and may have major defects. Add the
6566 following triples to an existing rustup installation with `rustup target add`:
6567 - `arm-unknown-linux-musleabi`
6568 - `arm-unknown-linux-musleabihf`
6569 - `armv7-unknown-linux-musleabihf`
6570* This release includes [experimental support for WebAssembly][1.14wasm], via
6571 the `wasm32-unknown-emscripten` target. This target is known to have major
6572 defects. Please test, report, and fix.
6573* rustup no longer installs documentation by default. Run `rustup
6574 component add rust-docs` to install.
6575* [Fix line stepping in debugger][37310]
6576* [Enable line number debuginfo in releases][37280]
6577
6578Misc
6579----
6580
6581* [Disable jemalloc on aarch64/powerpc/mips][37392]
6582* [Add support for Fuchsia OS][37313]
6583* [Detect local-rebuild by only MAJOR.MINOR version][37273]
6584
6585Compatibility Notes
6586-------------------
6587
6588* [A number of forward-compatibility lints used by the compiler
6589 to gradually introduce language changes have been converted
6590 to deny by default][36894]:
6591 - ["use of inaccessible extern crate erroneously allowed"][36886]
6592 - ["type parameter default erroneously allowed in invalid location"][36887]
6593 - ["detects super or self keywords at the beginning of global path"][36888]
6594 - ["two overlapping inherent impls define an item with the same name
6595 were erroneously allowed"][36889]
6596 - ["floating-point constants cannot be used in patterns"][36890]
6597 - ["constants of struct or enum type can only be used in a pattern if
6598 the struct or enum has `#[derive(PartialEq, Eq)]`"][36891]
6599 - ["lifetimes or labels named `'_` were erroneously allowed"][36892]
6600* [Prohibit patterns in trait methods without bodies][37378]
6601* [The atomic `Ordering` enum may not be matched exhaustively][37351]
6602* [Future-proofing `#[no_link]` breaks some obscure cases][37247]
6603* [The `$crate` macro variable is accepted in fewer locations][37213]
6604* [Impls specifying extra region requirements beyond the trait
6605 they implement are rejected][37167]
6606* [Enums may not be unsized][37111]. Unsized enums are intended to
6607 work but never have. For now they are forbidden.
6608* [Enforce the shadowing restrictions from RFC 1560 for today's macros][36767]
6609
6610[tier 2]: https://forge.rust-lang.org/platform-support.html
6611[1.14rustup]: https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/204
6612[1.14wasm]: https://users.rust-lang.org/t/compiling-to-the-web-with-rust-and-emscripten/7627
6613[36430]: https://github.com/rust-lang/rust/pull/36430
6614[36595]: https://github.com/rust-lang/rust/pull/36595
6615[36595]: https://github.com/rust-lang/rust/pull/36595
6616[36692]: https://github.com/rust-lang/rust/pull/36692
6617[36767]: https://github.com/rust-lang/rust/pull/36767
6618[36794]: https://github.com/rust-lang/rust/pull/36794
6619[36798]: https://github.com/rust-lang/rust/pull/36798
6620[36819]: https://github.com/rust-lang/rust/pull/36819
6621[36822]: https://github.com/rust-lang/rust/pull/36822
6622[36825]: https://github.com/rust-lang/rust/pull/36825
6623[36843]: https://github.com/rust-lang/rust/pull/36843
6624[36880]: https://github.com/rust-lang/rust/pull/36880
6625[36886]: https://github.com/rust-lang/rust/issues/36886
6626[36887]: https://github.com/rust-lang/rust/issues/36887
6627[36888]: https://github.com/rust-lang/rust/issues/36888
6628[36889]: https://github.com/rust-lang/rust/issues/36889
6629[36890]: https://github.com/rust-lang/rust/issues/36890
6630[36891]: https://github.com/rust-lang/rust/issues/36891
6631[36892]: https://github.com/rust-lang/rust/issues/36892
6632[36894]: https://github.com/rust-lang/rust/pull/36894
6633[36917]: https://github.com/rust-lang/rust/pull/36917
6634[36993]: https://github.com/rust-lang/rust/pull/36993
6635[37037]: https://github.com/rust-lang/rust/pull/37037
6636[37064]: https://github.com/rust-lang/rust/pull/37064
6637[37094]: https://github.com/rust-lang/rust/pull/37094
6638[37108]: https://github.com/rust-lang/rust/pull/37108
6639[37111]: https://github.com/rust-lang/rust/pull/37111
6640[37161]: https://github.com/rust-lang/rust/pull/37161
6641[37162]: https://github.com/rust-lang/rust/pull/37162
6642[37167]: https://github.com/rust-lang/rust/pull/37167
6643[37178]: https://github.com/rust-lang/rust/pull/37178
6644[37200]: https://github.com/rust-lang/rust/pull/37200
6645[37213]: https://github.com/rust-lang/rust/pull/37213
6646[37221]: https://github.com/rust-lang/rust/pull/37221
6647[37224]: https://github.com/rust-lang/rust/pull/37224
6648[37230]: https://github.com/rust-lang/rust/pull/37230
6649[37231]: https://github.com/rust-lang/rust/pull/37231
6650[37247]: https://github.com/rust-lang/rust/pull/37247
6651[37267]: https://github.com/rust-lang/rust/pull/37267
6652[37270]: https://github.com/rust-lang/rust/pull/37270
6653[37273]: https://github.com/rust-lang/rust/pull/37273
6654[37280]: https://github.com/rust-lang/rust/pull/37280
6655[37298]: https://github.com/rust-lang/rust/pull/37298
6656[37306]: https://github.com/rust-lang/rust/pull/37306
6657[37310]: https://github.com/rust-lang/rust/pull/37310
6658[37312]: https://github.com/rust-lang/rust/pull/37312
6659[37313]: https://github.com/rust-lang/rust/pull/37313
6660[37315]: https://github.com/rust-lang/rust/pull/37315
6661[37318]: https://github.com/rust-lang/rust/pull/37318
6662[37322]: https://github.com/rust-lang/rust/pull/37322
6663[37326]: https://github.com/rust-lang/rust/pull/37326
6664[37351]: https://github.com/rust-lang/rust/pull/37351
6665[37356]: https://github.com/rust-lang/rust/pull/37356
6666[37367]: https://github.com/rust-lang/rust/pull/37367
6667[37373]: https://github.com/rust-lang/rust/pull/37373
6668[37378]: https://github.com/rust-lang/rust/pull/37378
6669[37389]: https://github.com/rust-lang/rust/pull/37389
6670[37392]: https://github.com/rust-lang/rust/pull/37392
6671[37427]: https://github.com/rust-lang/rust/pull/37427
6672[37439]: https://github.com/rust-lang/rust/pull/37439
6673[37445]: https://github.com/rust-lang/rust/pull/37445
6674[37470]: https://github.com/rust-lang/rust/pull/37470
6675[37569]: https://github.com/rust-lang/rust/pull/37569
6676[RFC 1492]: https://github.com/rust-lang/rfcs/blob/master/text/1492-dotdot-in-patterns.md
6677[cargo/3175]: https://github.com/rust-lang/cargo/pull/3175
6678[cargo/3220]: https://github.com/rust-lang/cargo/pull/3220
6679[cargo/3243]: https://github.com/rust-lang/cargo/pull/3243
6680[cargo/3249]: https://github.com/rust-lang/cargo/pull/3249
6681[cargo/3259]: https://github.com/rust-lang/cargo/pull/3259
6682[cargo/3280]: https://github.com/rust-lang/cargo/pull/3280
6683
6684
6685Version 1.13.0 (2016-11-10)
6686===========================
6687
6688Language
6689--------
6690
6691* [Stabilize the `?` operator][36995]. `?` is a simple way to propagate
6692 errors, like the `try!` macro, described in [RFC 0243].
6693* [Stabilize macros in type position][36014]. Described in [RFC 873].
6694* [Stabilize attributes on statements][36995]. Described in [RFC 0016].
6695* [Fix `#[derive]` for empty tuple structs/variants][35728]
6696* [Fix lifetime rules for 'if' conditions][36029]
6697* [Avoid loading and parsing unconfigured non-inline modules][36482]
6698
6699Compiler
6700--------
6701
6702* [Add the `-C link-arg` argument][36574]
6703* [Remove the old AST-based backend from rustc_trans][35764]
6704* [Don't enable NEON by default on armv7 Linux][35814]
6705* [Fix debug line number info for macro expansions][35238]
6706* [Do not emit "class method" debuginfo for types that are not
6707 DICompositeType][36008]
6708* [Warn about multiple conflicting #[repr] hints][34623]
6709* [When sizing DST, don't double-count nested struct prefixes][36351]
6710* [Default RUST_MIN_STACK to 16MiB for now][36505]
6711* [Improve rlib metadata format][36551]. Reduces rlib size significantly.
6712* [Reject macros with empty repetitions to avoid infinite loop][36721]
6713* [Expand macros without recursing to avoid stack overflows][36214]
6714
6715Diagnostics
6716-----------
6717
6718* [Replace macro backtraces with labeled local uses][35702]
ff7c6d11 6719* [Improve error message for misplaced doc comments][33922]
476ff2be
SL
6720* [Buffer unix and lock windows to prevent message interleaving][35975]
6721* [Update lifetime errors to specifically note temporaries][36171]
6722* [Special case a few colors for Windows][36178]
6723* [Suggest `use self` when such an import resolves][36289]
6724* [Be more specific when type parameter shadows primitive type][36338]
6725* Many minor improvements
6726
6727Compile-time Optimizations
6728--------------------------
6729
6730* [Compute and cache HIR hashes at beginning][35854]
6731* [Don't hash types in loan paths][36004]
6732* [Cache projections in trans][35761]
6733* [Optimize the parser's last token handling][36527]
6734* [Only instantiate #[inline] functions in codegen units referencing
6735 them][36524]. This leads to big improvements in cases where crates export
6736 define many inline functions without using them directly.
6737* [Lazily allocate TypedArena's first chunk][36592]
6738* [Don't allocate during default HashSet creation][36734]
6739
6740Stabilized APIs
6741---------------
6742
6743* [`checked_abs`]
6744* [`wrapping_abs`]
6745* [`overflowing_abs`]
6746* [`RefCell::try_borrow`]
6747* [`RefCell::try_borrow_mut`]
6748
6749Libraries
6750---------
6751
6752* [Add `assert_ne!` and `debug_assert_ne!`][35074]
6753* [Make `vec_deque::Drain`, `hash_map::Drain`, and `hash_set::Drain`
6754 covariant][35354]
6755* [Implement `AsRef<[T]>` for `std::slice::Iter`][35559]
6756* [Implement `Debug` for `std::vec::IntoIter`][35707]
6757* [`CString`: avoid excessive growth just to 0-terminate][35871]
6758* [Implement `CoerceUnsized` for `{Cell, RefCell, UnsafeCell}`][35627]
6759* [Use arc4rand on FreeBSD][35884]
6760* [memrchr: Correct aligned offset computation][35969]
6761* [Improve Demangling of Rust Symbols][36059]
6762* [Use monotonic time in condition variables][35048]
6763* [Implement `Debug` for `std::path::{Components,Iter}`][36101]
6764* [Implement conversion traits for `char`][35755]
6765* [Fix illegal instruction caused by overflow in channel cloning][36104]
6766* [Zero first byte of CString on drop][36264]
6767* [Inherit overflow checks for sum and product][36372]
6768* [Add missing Eq implementations][36423]
6769* [Implement `Debug` for `DirEntry`][36631]
6770* [When `getaddrinfo` returns `EAI_SYSTEM` retrieve actual error from
6771 `errno`][36754]
6772* [`SipHasher`] is deprecated. Use [`DefaultHasher`].
6773* [Implement more traits for `std::io::ErrorKind`][35911]
6774* [Optimize BinaryHeap bounds checking][36072]
6775* [Work around pointer aliasing issue in `Vec::extend_from_slice`,
6776 `extend_with_element`][36355]
6777* [Fix overflow checking in unsigned pow()][34942]
6778
6779Cargo
6780-----
6781
6782* This release includes security fixes to both curl and OpenSSL.
6783* [Fix transitive doctests when panic=abort][cargo/3021]
6784* [Add --all-features flag to cargo][cargo/3038]
6785* [Reject path-based dependencies in `cargo package`][cargo/3060]
6786* [Don't parse the home directory more than once][cargo/3078]
6787* [Don't try to generate Cargo.lock on empty workspaces][cargo/3092]
6788* [Update OpenSSL to 1.0.2j][cargo/3121]
6789* [Add license and license_file to cargo metadata output][cargo/3110]
6790* [Make crates-io registry URL optional in config; ignore all changes to
6791 source.crates-io][cargo/3089]
6792* [Don't download dependencies from other platforms][cargo/3123]
6793* [Build transitive dev-dependencies when needed][cargo/3125]
6794* [Add support for per-target rustflags in .cargo/config][cargo/3157]
6795* [Avoid updating registry when adding existing deps][cargo/3144]
6796* [Warn about path overrides that won't work][cargo/3136]
6797* [Use workspaces during `cargo install`][cargo/3146]
6798* [Leak mspdbsrv.exe processes on Windows][cargo/3162]
6799* [Add --message-format flag][cargo/3000]
6800* [Pass target environment for rustdoc][cargo/3205]
6801* [Use `CommandExt::exec` for `cargo run` on Unix][cargo/2818]
6802* [Update curl and curl-sys][cargo/3241]
6803* [Call rustdoc test with the correct cfg flags of a package][cargo/3242]
6804
6805Tooling
6806-------
6807
6808* [rustdoc: Add the `--sysroot` argument][36586]
6809* [rustdoc: Fix a couple of issues with the search results][35655]
6810* [rustdoc: remove the `!` from macro URLs and titles][35234]
6811* [gdb: Fix pretty-printing special-cased Rust types][35585]
6812* [rustdoc: Filter more incorrect methods inherited through Deref][36266]
6813
6814Misc
6815----
6816
6817* [Remove unmaintained style guide][35124]
6818* [Add s390x support][36369]
6819* [Initial work at Haiku OS support][36727]
6820* [Add mips-uclibc targets][35734]
6821* [Crate-ify compiler-rt into compiler-builtins][35021]
6822* [Add rustc version info (git hash + date) to dist tarball][36213]
6823* Many documentation improvements
6824
6825Compatibility Notes
6826-------------------
6827
6828* [`SipHasher`] is deprecated. Use [`DefaultHasher`].
6829* [Deny (by default) transmuting from fn item types to pointer-sized
6830 types][34923]. Continuing the long transition to zero-sized fn items,
6831 per [RFC 401].
6832* [Fix `#[derive]` for empty tuple structs/variants][35728].
6833 Part of [RFC 1506].
6834* [Issue deprecation warnings for safe accesses to extern statics][36173]
6835* [Fix lifetime rules for 'if' conditions][36029].
6836* [Inherit overflow checks for sum and product][36372].
6837* [Forbid user-defined macros named "macro_rules"][36730].
6838
6839[33922]: https://github.com/rust-lang/rust/pull/33922
6840[34623]: https://github.com/rust-lang/rust/pull/34623
6841[34923]: https://github.com/rust-lang/rust/pull/34923
6842[34942]: https://github.com/rust-lang/rust/pull/34942
6843[34982]: https://github.com/rust-lang/rust/pull/34982
6844[35021]: https://github.com/rust-lang/rust/pull/35021
6845[35048]: https://github.com/rust-lang/rust/pull/35048
6846[35074]: https://github.com/rust-lang/rust/pull/35074
6847[35124]: https://github.com/rust-lang/rust/pull/35124
6848[35234]: https://github.com/rust-lang/rust/pull/35234
6849[35238]: https://github.com/rust-lang/rust/pull/35238
6850[35354]: https://github.com/rust-lang/rust/pull/35354
6851[35559]: https://github.com/rust-lang/rust/pull/35559
6852[35585]: https://github.com/rust-lang/rust/pull/35585
6853[35627]: https://github.com/rust-lang/rust/pull/35627
6854[35655]: https://github.com/rust-lang/rust/pull/35655
6855[35702]: https://github.com/rust-lang/rust/pull/35702
6856[35707]: https://github.com/rust-lang/rust/pull/35707
6857[35728]: https://github.com/rust-lang/rust/pull/35728
6858[35734]: https://github.com/rust-lang/rust/pull/35734
6859[35755]: https://github.com/rust-lang/rust/pull/35755
6860[35761]: https://github.com/rust-lang/rust/pull/35761
6861[35764]: https://github.com/rust-lang/rust/pull/35764
6862[35814]: https://github.com/rust-lang/rust/pull/35814
6863[35854]: https://github.com/rust-lang/rust/pull/35854
6864[35871]: https://github.com/rust-lang/rust/pull/35871
6865[35884]: https://github.com/rust-lang/rust/pull/35884
6866[35911]: https://github.com/rust-lang/rust/pull/35911
6867[35969]: https://github.com/rust-lang/rust/pull/35969
6868[35975]: https://github.com/rust-lang/rust/pull/35975
6869[36004]: https://github.com/rust-lang/rust/pull/36004
6870[36008]: https://github.com/rust-lang/rust/pull/36008
6871[36014]: https://github.com/rust-lang/rust/pull/36014
6872[36029]: https://github.com/rust-lang/rust/pull/36029
6873[36059]: https://github.com/rust-lang/rust/pull/36059
6874[36072]: https://github.com/rust-lang/rust/pull/36072
6875[36101]: https://github.com/rust-lang/rust/pull/36101
6876[36104]: https://github.com/rust-lang/rust/pull/36104
6877[36171]: https://github.com/rust-lang/rust/pull/36171
6878[36173]: https://github.com/rust-lang/rust/pull/36173
6879[36178]: https://github.com/rust-lang/rust/pull/36178
6880[36213]: https://github.com/rust-lang/rust/pull/36213
6881[36214]: https://github.com/rust-lang/rust/pull/36214
6882[36264]: https://github.com/rust-lang/rust/pull/36264
6883[36266]: https://github.com/rust-lang/rust/pull/36266
6884[36289]: https://github.com/rust-lang/rust/pull/36289
6885[36338]: https://github.com/rust-lang/rust/pull/36338
6886[36351]: https://github.com/rust-lang/rust/pull/36351
6887[36355]: https://github.com/rust-lang/rust/pull/36355
6888[36369]: https://github.com/rust-lang/rust/pull/36369
6889[36372]: https://github.com/rust-lang/rust/pull/36372
6890[36423]: https://github.com/rust-lang/rust/pull/36423
6891[36482]: https://github.com/rust-lang/rust/pull/36482
6892[36505]: https://github.com/rust-lang/rust/pull/36505
6893[36524]: https://github.com/rust-lang/rust/pull/36524
6894[36527]: https://github.com/rust-lang/rust/pull/36527
6895[36551]: https://github.com/rust-lang/rust/pull/36551
6896[36574]: https://github.com/rust-lang/rust/pull/36574
6897[36586]: https://github.com/rust-lang/rust/pull/36586
6898[36592]: https://github.com/rust-lang/rust/pull/36592
6899[36631]: https://github.com/rust-lang/rust/pull/36631
6900[36639]: https://github.com/rust-lang/rust/pull/36639
6901[36721]: https://github.com/rust-lang/rust/pull/36721
6902[36727]: https://github.com/rust-lang/rust/pull/36727
6903[36730]: https://github.com/rust-lang/rust/pull/36730
6904[36734]: https://github.com/rust-lang/rust/pull/36734
6905[36754]: https://github.com/rust-lang/rust/pull/36754
6906[36995]: https://github.com/rust-lang/rust/pull/36995
6907[RFC 0016]: https://github.com/rust-lang/rfcs/blob/master/text/0016-more-attributes.md
6908[RFC 0243]: https://github.com/rust-lang/rfcs/blob/master/text/0243-trait-based-exception-handling.md
6909[RFC 1506]: https://github.com/rust-lang/rfcs/blob/master/text/1506-adt-kinds.md
6910[RFC 401]: https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
6911[RFC 873]: https://github.com/rust-lang/rfcs/blob/master/text/0873-type-macros.md
6912[cargo/2818]: https://github.com/rust-lang/cargo/pull/2818
6913[cargo/3000]: https://github.com/rust-lang/cargo/pull/3000
6914[cargo/3021]: https://github.com/rust-lang/cargo/pull/3021
6915[cargo/3038]: https://github.com/rust-lang/cargo/pull/3038
6916[cargo/3060]: https://github.com/rust-lang/cargo/pull/3060
6917[cargo/3078]: https://github.com/rust-lang/cargo/pull/3078
6918[cargo/3089]: https://github.com/rust-lang/cargo/pull/3089
6919[cargo/3092]: https://github.com/rust-lang/cargo/pull/3092
6920[cargo/3110]: https://github.com/rust-lang/cargo/pull/3110
6921[cargo/3121]: https://github.com/rust-lang/cargo/pull/3121
6922[cargo/3123]: https://github.com/rust-lang/cargo/pull/3123
6923[cargo/3125]: https://github.com/rust-lang/cargo/pull/3125
6924[cargo/3136]: https://github.com/rust-lang/cargo/pull/3136
6925[cargo/3144]: https://github.com/rust-lang/cargo/pull/3144
6926[cargo/3146]: https://github.com/rust-lang/cargo/pull/3146
6927[cargo/3157]: https://github.com/rust-lang/cargo/pull/3157
6928[cargo/3162]: https://github.com/rust-lang/cargo/pull/3162
6929[cargo/3205]: https://github.com/rust-lang/cargo/pull/3205
6930[cargo/3241]: https://github.com/rust-lang/cargo/pull/3241
6931[cargo/3242]: https://github.com/rust-lang/cargo/pull/3242
6932[rustup]: https://www.rustup.rs
6933[`checked_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.checked_abs
6934[`wrapping_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.wrapping_abs
6935[`overflowing_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.overflowing_abs
6936[`RefCell::try_borrow`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow
6937[`RefCell::try_borrow_mut`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_mut
6938[`SipHasher`]: https://doc.rust-lang.org/std/hash/struct.SipHasher.html
6939[`DefaultHasher`]: https://doc.rust-lang.org/std/collections/hash_map/struct.DefaultHasher.html
6940
6941
9e0c209e
SL
6942Version 1.12.1 (2016-10-20)
6943===========================
6944
6945Regression Fixes
6946----------------
6947
6948* [ICE: 'rustc' panicked at 'assertion failed: concrete_substs.is_normalized_for_trans()' #36381][36381]
6949* [Confusion with double negation and booleans][36856]
6950* [rustc 1.12.0 fails with SIGSEGV in release mode (syn crate 0.8.0)][36875]
6951* [Rustc 1.12.0 Windows build of `ethcore` crate fails with LLVM error][36924]
6952* [1.12.0: High memory usage when linking in release mode with debug info][36926]
6953* [Corrupted memory after updated to 1.12][36936]
6954* ["Let NullaryConstructor = something;" causes internal compiler error: "tried to overwrite interned AdtDef"][37026]
6955* [Fix ICE: inject bitcast if types mismatch for invokes/calls/stores][37112]
6956* [debuginfo: Handle spread_arg case in MIR-trans in a more stable way.][37153]
6957
6958[36381]: https://github.com/rust-lang/rust/issues/36381
6959[36856]: https://github.com/rust-lang/rust/issues/36856
6960[36875]: https://github.com/rust-lang/rust/issues/36875
6961[36924]: https://github.com/rust-lang/rust/issues/36924
6962[36926]: https://github.com/rust-lang/rust/issues/36926
6963[36936]: https://github.com/rust-lang/rust/issues/36936
6964[37026]: https://github.com/rust-lang/rust/issues/37026
6965[37112]: https://github.com/rust-lang/rust/issues/37112
6966[37153]: https://github.com/rust-lang/rust/issues/37153
6967
6968
5bcae85e
SL
6969Version 1.12.0 (2016-09-29)
6970===========================
6971
6972Highlights
6973----------
6974
7cac9316 6975* [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)](https://github.com/rust-lang/rust/pull/34096).
5bcae85e
SL
6976 This translation pass is far simpler than the previous AST->LLVM pass, and
6977 creates opportunities to perform new optimizations directly on the MIR. It
7cac9316 6978 was previously described [on the Rust blog](https://blog.rust-lang.org/2016/04/19/MIR.html).
5bcae85e 6979* [`rustc` presents a new, more readable error format, along with
7cac9316 6980 machine-readable JSON error output for use by IDEs](https://github.com/rust-lang/rust/pull/35401).
5bcae85e 6981 Most common editors supporting Rust have been updated to work with it. It was
7cac9316 6982 previously described [on the Rust blog](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
5bcae85e
SL
6983
6984Compiler
6985--------
6986
7cac9316 6987* [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)](https://github.com/rust-lang/rust/pull/34096).
5bcae85e
SL
6988 This translation pass is far simpler than the previous AST->LLVM pass, and
6989 creates opportunities to perform new optimizations directly on the MIR. It
7cac9316 6990 was previously described [on the Rust blog](https://blog.rust-lang.org/2016/04/19/MIR.html).
5bcae85e 6991* [Print the Rust target name, not the LLVM target name, with
7cac9316 6992 `--print target-list`](https://github.com/rust-lang/rust/pull/35489)
5bcae85e 6993* [The computation of `TypeId` is correct in some cases where it was previously
7cac9316
XL
6994 producing inconsistent results](https://github.com/rust-lang/rust/pull/35267)
6995* [The `mips-unknown-linux-gnu` target uses hardware floating point by default](https://github.com/rust-lang/rust/pull/34910)
5bcae85e
SL
6996* [The `rustc` arguments, `--print target-cpus`, `--print target-features`,
6997 `--print relocation-models`, and `--print code-models` print the available
6998 options to the `-C target-cpu`, `-C target-feature`, `-C relocation-model` and
7cac9316 6999 `-C code-model` code generation arguments](https://github.com/rust-lang/rust/pull/34845)
5bcae85e 7000* [`rustc` supports three new MUSL targets on ARM: `arm-unknown-linux-musleabi`,
7cac9316 7001 `arm-unknown-linux-musleabihf`, and `armv7-unknown-linux-musleabihf`](https://github.com/rust-lang/rust/pull/35060).
5bcae85e
SL
7002 These targets produce statically-linked binaries. There are no binary release
7003 builds yet though.
7004
7005Diagnostics
7006-----------
7007
7008* [`rustc` presents a new, more readable error format, along with
7cac9316 7009 machine-readable JSON error output for use by IDEs](https://github.com/rust-lang/rust/pull/35401).
5bcae85e 7010 Most common editors supporting Rust have been updated to work with it. It was
7cac9316 7011 previously described [on the Rust blog](https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
c30ab7b3 7012* [In error descriptions, references are now described in plain English,
7cac9316 7013 instead of as "&-ptr"](https://github.com/rust-lang/rust/pull/35611)
5bcae85e 7014* [In error type descriptions, unknown numeric types are named `{integer}` or
7cac9316
XL
7015 `{float}` instead of `_`](https://github.com/rust-lang/rust/pull/35080)
7016* [`rustc` emits a clearer error when inner attributes follow a doc comment](https://github.com/rust-lang/rust/pull/34676)
5bcae85e
SL
7017
7018Language
7019--------
7020
7cac9316
XL
7021* [`macro_rules!` invocations can be made within `macro_rules!` invocations](https://github.com/rust-lang/rust/pull/34925)
7022* [`macro_rules!` meta-variables are hygienic](https://github.com/rust-lang/rust/pull/35453)
5bcae85e 7023* [`macro_rules!` `tt` matchers can be reparsed correctly, making them much more
7cac9316 7024 useful](https://github.com/rust-lang/rust/pull/34908)
5bcae85e 7025* [`macro_rules!` `stmt` matchers correctly consume the entire contents when
7cac9316 7026 inside non-braces invocations](https://github.com/rust-lang/rust/pull/34886)
ff7c6d11 7027* [Semicolons are properly required as statement delimiters inside
7cac9316
XL
7028 `macro_rules!` invocations](https://github.com/rust-lang/rust/pull/34660)
7029* [`cfg_attr` works on `path` attributes](https://github.com/rust-lang/rust/pull/34546)
5bcae85e
SL
7030
7031Stabilized APIs
7032---------------
7033
7cac9316
XL
7034* [`Cell::as_ptr`](https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr)
7035* [`RefCell::as_ptr`](https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.as_ptr)
7036* [`IpAddr::is_unspecified`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_unspecified)
7037* [`IpAddr::is_loopback`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_loopback)
7038* [`IpAddr::is_multicast`](https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_multicast)
7039* [`Ipv4Addr::is_unspecified`](https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified)
7040* [`Ipv6Addr::octets`](https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.octets)
7041* [`LinkedList::contains`](https://doc.rust-lang.org/std/collections/linked_list/struct.LinkedList.html#method.contains)
7042* [`VecDeque::contains`](https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.contains)
7043* [`ExitStatusExt::from_raw`](https://doc.rust-lang.org/std/os/unix/process/trait.ExitStatusExt.html#tymethod.from_raw).
5bcae85e 7044 Both on Unix and Windows.
7cac9316
XL
7045* [`Receiver::recv_timeout`](https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.recv_timeout)
7046* [`RecvTimeoutError`](https://doc.rust-lang.org/std/sync/mpsc/enum.RecvTimeoutError.html)
7047* [`BinaryHeap::peek_mut`](https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.peek_mut)
7048* [`PeekMut`](https://doc.rust-lang.org/std/collections/binary_heap/struct.PeekMut.html)
7049* [`iter::Product`](https://doc.rust-lang.org/std/iter/trait.Product.html)
7050* [`iter::Sum`](https://doc.rust-lang.org/std/iter/trait.Sum.html)
7051* [`OccupiedEntry::remove_entry`](https://doc.rust-lang.org/std/collections/btree_map/struct.OccupiedEntry.html#method.remove_entry)
7052* [`VacantEntry::into_key`](https://doc.rust-lang.org/std/collections/btree_map/struct.VacantEntry.html#method.into_key)
5bcae85e
SL
7053
7054Libraries
7055---------
7056
7057* [The `format!` macro and friends now allow a single argument to be formatted
7cac9316 7058 in multiple styles](https://github.com/rust-lang/rust/pull/33642)
5bcae85e 7059* [The lifetime bounds on `[T]::binary_search_by` and
7cac9316
XL
7060 `[T]::binary_search_by_key` have been adjusted to be more flexible](https://github.com/rust-lang/rust/pull/34762)
7061* [`Option` implements `From` for its contained type](https://github.com/rust-lang/rust/pull/34828)
7062* [`Cell`, `RefCell` and `UnsafeCell` implement `From` for their contained type](https://github.com/rust-lang/rust/pull/35392)
7063* [`RwLock` panics if the reader count overflows](https://github.com/rust-lang/rust/pull/35378)
7064* [`vec_deque::Drain`, `hash_map::Drain` and `hash_set::Drain` are covariant](https://github.com/rust-lang/rust/pull/35354)
7065* [`vec::Drain` and `binary_heap::Drain` are covariant](https://github.com/rust-lang/rust/pull/34951)
7066* [`Cow<str>` implements `FromIterator` for `char`, `&str` and `String`](https://github.com/rust-lang/rust/pull/35064)
7067* [Sockets on Linux are correctly closed in subprocesses via `SOCK_CLOEXEC`](https://github.com/rust-lang/rust/pull/34946)
5bcae85e 7068* [`hash_map::Entry`, `hash_map::VacantEntry` and `hash_map::OccupiedEntry`
7cac9316 7069 implement `Debug`](https://github.com/rust-lang/rust/pull/34937)
5bcae85e 7070* [`btree_map::Entry`, `btree_map::VacantEntry` and `btree_map::OccupiedEntry`
7cac9316
XL
7071 implement `Debug`](https://github.com/rust-lang/rust/pull/34885)
7072* [`String` implements `AddAssign`](https://github.com/rust-lang/rust/pull/34890)
5bcae85e 7073* [Variadic `extern fn` pointers implement the `Clone`, `PartialEq`, `Eq`,
7cac9316
XL
7074 `PartialOrd`, `Ord`, `Hash`, `fmt::Pointer`, and `fmt::Debug` traits](https://github.com/rust-lang/rust/pull/34879)
7075* [`FileType` implements `Debug`](https://github.com/rust-lang/rust/pull/34757)
7076* [References to `Mutex` and `RwLock` are unwind-safe](https://github.com/rust-lang/rust/pull/34756)
5bcae85e 7077* [`mpsc::sync_channel` `Receiver`s return any available message before
7cac9316
XL
7078 reporting a disconnect](https://github.com/rust-lang/rust/pull/34731)
7079* [Unicode definitions have been updated to 9.0](https://github.com/rust-lang/rust/pull/34599)
7080* [`env` iterators implement `DoubleEndedIterator`](https://github.com/rust-lang/rust/pull/33312)
5bcae85e
SL
7081
7082Cargo
7083-----
7084
7cac9316
XL
7085* [Support local mirrors of registries](https://github.com/rust-lang/cargo/pull/2857)
7086* [Add support for command aliases](https://github.com/rust-lang/cargo/pull/2679)
7087* [Allow `opt-level="s"` / `opt-level="z"` in profile overrides](https://github.com/rust-lang/cargo/pull/3007)
7088* [Make `cargo doc --open --target` work as expected](https://github.com/rust-lang/cargo/pull/2988)
7089* [Speed up noop registry updates](https://github.com/rust-lang/cargo/pull/2974)
7090* [Update OpenSSL](https://github.com/rust-lang/cargo/pull/2971)
7091* [Fix `--panic=abort` with plugins](https://github.com/rust-lang/cargo/pull/2954)
7092* [Always pass `-C metadata` to the compiler](https://github.com/rust-lang/cargo/pull/2946)
7093* [Fix depending on git repos with workspaces](https://github.com/rust-lang/cargo/pull/2938)
7094* [Add a `--lib` flag to `cargo new`](https://github.com/rust-lang/cargo/pull/2921)
7095* [Add `http.cainfo` for custom certs](https://github.com/rust-lang/cargo/pull/2917)
7096* [Indicate the compilation profile after compiling](https://github.com/rust-lang/cargo/pull/2909)
7097* [Allow enabling features for dependencies with `--features`](https://github.com/rust-lang/cargo/pull/2876)
7098* [Add `--jobs` flag to `cargo package`](https://github.com/rust-lang/cargo/pull/2867)
7099* [Add `--dry-run` to `cargo publish`](https://github.com/rust-lang/cargo/pull/2849)
7100* [Add support for `RUSTDOCFLAGS`](https://github.com/rust-lang/cargo/pull/2794)
5bcae85e
SL
7101
7102Performance
7103-----------
7104
7cac9316
XL
7105* [`panic::catch_unwind` is more optimized](https://github.com/rust-lang/rust/pull/35444)
7106* [`panic::catch_unwind` no longer accesses thread-local storage on entry](https://github.com/rust-lang/rust/pull/34866)
5bcae85e
SL
7107
7108Tooling
7109-------
7110
7111* [Test binaries now support a `--test-threads` argument to specify the number
7112 of threads used to run tests, and which acts the same as the
3b2f2976 7113 `RUST_TEST_THREADS` environment variable](https://github.com/rust-lang/rust/pull/35414)
7cac9316
XL
7114* [The test runner now emits a warning when tests run over 60 seconds](https://github.com/rust-lang/rust/pull/35405)
7115* [rustdoc: Fix methods in search results](https://github.com/rust-lang/rust/pull/34752)
7116* [`rust-lldb` warns about unsupported versions of LLDB](https://github.com/rust-lang/rust/pull/34646)
5bcae85e 7117* [Rust releases now come with source packages that can be installed by rustup
7cac9316 7118 via `rustup component add rust-src`](https://github.com/rust-lang/rust/pull/34366).
5bcae85e
SL
7119 The resulting source code can be used by tools and IDES, located in the
7120 sysroot under `lib/rustlib/src`.
7121
7122Misc
7123----
7124
7cac9316 7125* [The compiler can now be built against LLVM 3.9](https://github.com/rust-lang/rust/pull/35594)
5bcae85e 7126* Many minor improvements to the documentation.
7cac9316 7127* [The Rust exception handling "personality" routine is now written in Rust](https://github.com/rust-lang/rust/pull/34832)
5bcae85e
SL
7128
7129Compatibility Notes
7130-------------------
7131
7132* [When printing Windows `OsStr`s, unpaired surrogate codepoints are escaped
7cac9316 7133 with the lowercase format instead of the uppercase](https://github.com/rust-lang/rust/pull/35084)
5bcae85e 7134* [When formatting strings, if "precision" is specified, the "fill",
7cac9316
XL
7135 "align" and "width" specifiers are no longer ignored](https://github.com/rust-lang/rust/pull/34544)
7136* [The `Debug` impl for strings no longer escapes all non-ASCII characters](https://github.com/rust-lang/rust/pull/34485)
5bcae85e
SL
7137
7138
7139Version 1.11.0 (2016-08-18)
7140===========================
7141
7142Language
7143--------
7144
7cac9316
XL
7145* [Support nested `cfg_attr` attributes](https://github.com/rust-lang/rust/pull/34216)
7146* [Allow statement-generating braced macro invocations at the end of blocks](https://github.com/rust-lang/rust/pull/34436)
7147* [Macros can be expanded inside of trait definitions](https://github.com/rust-lang/rust/pull/34213)
7148* [`#[macro_use]` works properly when it is itself expanded from a macro](https://github.com/rust-lang/rust/pull/34032)
5bcae85e
SL
7149
7150Stabilized APIs
7151---------------
7152
7cac9316
XL
7153* [`BinaryHeap::append`](https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.append)
7154* [`BTreeMap::append`](https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.append)
7155* [`BTreeMap::split_off`](https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.split_off)
7156* [`BTreeSet::append`](https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.append)
7157* [`BTreeSet::split_off`](https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.split_off)
7158* [`f32::to_degrees`](https://doc.rust-lang.org/std/primitive.f32.html#method.to_degrees)
5bcae85e 7159 (in libcore - previously stabilized in libstd)
7cac9316 7160* [`f32::to_radians`](https://doc.rust-lang.org/std/primitive.f32.html#method.to_radians)
5bcae85e 7161 (in libcore - previously stabilized in libstd)
7cac9316 7162* [`f64::to_degrees`](https://doc.rust-lang.org/std/primitive.f64.html#method.to_degrees)
5bcae85e 7163 (in libcore - previously stabilized in libstd)
7cac9316 7164* [`f64::to_radians`](https://doc.rust-lang.org/std/primitive.f64.html#method.to_radians)
5bcae85e 7165 (in libcore - previously stabilized in libstd)
7cac9316
XL
7166* [`Iterator::sum`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
7167* [`Iterator::product`](https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
7168* [`Cell::get_mut`](https://doc.rust-lang.org/std/cell/struct.Cell.html#method.get_mut)
7169* [`RefCell::get_mut`](https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.get_mut)
5bcae85e
SL
7170
7171Libraries
7172---------
7173
7174* [The `thread_local!` macro supports multiple definitions in a single
7cac9316
XL
7175 invocation, and can apply attributes](https://github.com/rust-lang/rust/pull/34077)
7176* [`Cow` implements `Default`](https://github.com/rust-lang/rust/pull/34305)
5bcae85e 7177* [`Wrapping` implements binary, octal, lower-hex and upper-hex
7cac9316
XL
7178 `Display` formatting](https://github.com/rust-lang/rust/pull/34190)
7179* [The range types implement `Hash`](https://github.com/rust-lang/rust/pull/34180)
7180* [`lookup_host` ignores unknown address types](https://github.com/rust-lang/rust/pull/34067)
7181* [`assert_eq!` accepts a custom error message, like `assert!` does](https://github.com/rust-lang/rust/pull/33976)
7182* [The main thread is now called "main" instead of "&lt;main&gt;"](https://github.com/rust-lang/rust/pull/33803)
5bcae85e
SL
7183
7184Cargo
7185-----
7186
7cac9316
XL
7187* [Disallow specifying features of transitive deps](https://github.com/rust-lang/cargo/pull/2821)
7188* [Add color support for Windows consoles](https://github.com/rust-lang/cargo/pull/2804)
7189* [Fix `harness = false` on `[lib]` sections](https://github.com/rust-lang/cargo/pull/2795)
7190* [Don't panic when `links` contains a '.'](https://github.com/rust-lang/cargo/pull/2787)
7191* [Build scripts can emit warnings](https://github.com/rust-lang/cargo/pull/2630),
5bcae85e 7192 and `-vv` prints warnings for all crates.
7cac9316
XL
7193* [Ignore file locks on OS X NFS mounts](https://github.com/rust-lang/cargo/pull/2720)
7194* [Don't warn about `package.metadata` keys](https://github.com/rust-lang/cargo/pull/2668).
5bcae85e 7195 This provides room for expansion by arbitrary tools.
7cac9316
XL
7196* [Add support for cdylib crate types](https://github.com/rust-lang/cargo/pull/2741)
7197* [Prevent publishing crates when files are dirty](https://github.com/rust-lang/cargo/pull/2781)
7198* [Don't fetch all crates on clean](https://github.com/rust-lang/cargo/pull/2704)
7199* [Propagate --color option to rustc](https://github.com/rust-lang/cargo/pull/2779)
7200* [Fix `cargo doc --open` on Windows](https://github.com/rust-lang/cargo/pull/2780)
7201* [Improve autocompletion](https://github.com/rust-lang/cargo/pull/2772)
7202* [Configure colors of stderr as well as stdout](https://github.com/rust-lang/cargo/pull/2739)
5bcae85e
SL
7203
7204Performance
7205-----------
7206
7207* [Caching projections speeds up type check dramatically for some
7cac9316
XL
7208 workloads](https://github.com/rust-lang/rust/pull/33816)
7209* [The default `HashMap` hasher is SipHash 1-3 instead of SipHash 2-4](https://github.com/rust-lang/rust/pull/33940)
5bcae85e
SL
7210 This hasher is faster, but is believed to provide sufficient
7211 protection from collision attacks.
7cac9316 7212* [Comparison of `Ipv4Addr` is 10x faster](https://github.com/rust-lang/rust/pull/33891)
5bcae85e
SL
7213
7214Rustdoc
7215-------
7216
7cac9316 7217* [Fix empty implementation section on some module pages](https://github.com/rust-lang/rust/pull/34536)
2c00a5a8 7218* [Fix inlined renamed re-exports in import lists](https://github.com/rust-lang/rust/pull/34479)
7cac9316
XL
7219* [Fix search result layout for enum variants and struct fields](https://github.com/rust-lang/rust/pull/34477)
7220* [Fix issues with source links to external crates](https://github.com/rust-lang/rust/pull/34387)
2c00a5a8 7221* [Fix redirect pages for renamed re-exports](https://github.com/rust-lang/rust/pull/34245)
5bcae85e
SL
7222
7223Tooling
7224-------
7225
7cac9316 7226* [rustc is better at finding the MSVC toolchain](https://github.com/rust-lang/rust/pull/34492)
5bcae85e 7227* [When emitting debug info, rustc emits frame pointers for closures,
7cac9316
XL
7228 shims and glue, as it does for all other functions](https://github.com/rust-lang/rust/pull/33909)
7229* [rust-lldb warns about unsupported versions of LLDB](https://github.com/rust-lang/rust/pull/34646)
5bcae85e
SL
7230* Many more errors have been given error codes and extended
7231 explanations
7232* API documentation continues to be improved, with many new examples
7233
7234Misc
7235----
7236
7237* [rustc no longer hangs when dependencies recursively re-export
7cac9316
XL
7238 submodules](https://github.com/rust-lang/rust/pull/34542)
7239* [rustc requires LLVM 3.7+](https://github.com/rust-lang/rust/pull/34104)
5bcae85e 7240* [The 'How Safe and Unsafe Interact' chapter of The Rustonomicon was
7cac9316
XL
7241 rewritten](https://github.com/rust-lang/rust/pull/33895)
7242* [rustc support 16-bit pointer sizes](https://github.com/rust-lang/rust/pull/33460).
5bcae85e
SL
7243 No targets use this yet, but it works toward AVR support.
7244
7245Compatibility Notes
7246-------------------
7247
7cac9316 7248* [`const`s and `static`s may not have unsized types](https://github.com/rust-lang/rust/pull/34443)
5bcae85e 7249* [The new follow-set rules that place restrictions on `macro_rules!`
7cac9316 7250 in order to ensure syntax forward-compatibility have been enabled](https://github.com/rust-lang/rust/pull/33982)
ff7c6d11 7251 This was an [amendment to RFC 550](https://github.com/rust-lang/rfcs/pull/1384),
5bcae85e 7252 and has been a warning since 1.10.
7cac9316 7253* [`cfg` attribute process has been refactored to fix various bugs](https://github.com/rust-lang/rust/pull/33706).
5bcae85e
SL
7254 This causes breakage in some corner cases.
7255
7256
a7813a04
XL
7257Version 1.10.0 (2016-07-07)
7258===========================
7259
7260Language
7261--------
7262
7cac9316 7263* [`Copy` types are required to have a trivial implementation of `Clone`](https://github.com/rust-lang/rust/pull/33420).
a7813a04 7264 [RFC 1521](https://github.com/rust-lang/rfcs/blob/master/text/1521-copy-clone-semantics.md).
7cac9316
XL
7265* [Single-variant enums support the `#[repr(..)]` attribute](https://github.com/rust-lang/rust/pull/33355).
7266* [Fix `#[derive(RustcEncodable)]` in the presence of other `encode` methods](https://github.com/rust-lang/rust/pull/32908).
a7813a04 7267* [`panic!` can be converted to a runtime abort with the
7cac9316 7268 `-C panic=abort` flag](https://github.com/rust-lang/rust/pull/32900).
a7813a04 7269 [RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
7cac9316 7270* [Add a new crate type, 'cdylib'](https://github.com/rust-lang/rust/pull/33553).
a7813a04 7271 cdylibs are dynamic libraries suitable for loading by non-Rust hosts.
8faf50e0 7272 [RFC 1510](https://github.com/rust-lang/rfcs/blob/master/text/1510-cdylib.md).
a7813a04
XL
7273 Note that Cargo does not yet directly support cdylibs.
7274
7275Stabilized APIs
7276---------------
7277
7278* `os::windows::fs::OpenOptionsExt::access_mode`
7279* `os::windows::fs::OpenOptionsExt::share_mode`
7280* `os::windows::fs::OpenOptionsExt::custom_flags`
7281* `os::windows::fs::OpenOptionsExt::attributes`
7282* `os::windows::fs::OpenOptionsExt::security_qos_flags`
7283* `os::unix::fs::OpenOptionsExt::custom_flags`
7cac9316 7284* [`sync::Weak::new`](http://doc.rust-lang.org/alloc/arc/struct.Weak.html#method.new)
a7813a04 7285* `Default for sync::Weak`
7cac9316
XL
7286* [`panic::set_hook`](http://doc.rust-lang.org/std/panic/fn.set_hook.html)
7287* [`panic::take_hook`](http://doc.rust-lang.org/std/panic/fn.take_hook.html)
7288* [`panic::PanicInfo`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html)
7289* [`panic::PanicInfo::payload`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.payload)
7290* [`panic::PanicInfo::location`](http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.location)
7291* [`panic::Location`](http://doc.rust-lang.org/std/panic/struct.Location.html)
7292* [`panic::Location::file`](http://doc.rust-lang.org/std/panic/struct.Location.html#method.file)
7293* [`panic::Location::line`](http://doc.rust-lang.org/std/panic/struct.Location.html#method.line)
7294* [`ffi::CStr::from_bytes_with_nul`](http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
7295* [`ffi::CStr::from_bytes_with_nul_unchecked`](http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul_unchecked)
7296* [`ffi::FromBytesWithNulError`](http://doc.rust-lang.org/std/ffi/struct.FromBytesWithNulError.html)
7297* [`fs::Metadata::modified`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.modified)
7298* [`fs::Metadata::accessed`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.accessed)
7299* [`fs::Metadata::created`](http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.created)
a7813a04
XL
7300* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange`
7301* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak`
7302* `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key`
7303* `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}`
7cac9316
XL
7304* [`SocketAddr::is_unnamed`](http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.is_unnamed)
7305* [`SocketAddr::as_pathname`](http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.as_pathname)
7306* [`UnixStream::connect`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.connect)
7307* [`UnixStream::pair`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.pair)
7308* [`UnixStream::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.try_clone)
7309* [`UnixStream::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.local_addr)
7310* [`UnixStream::peer_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.peer_addr)
7311* [`UnixStream::set_read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
7312* [`UnixStream::set_write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
7313* [`UnixStream::read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
7314* [`UnixStream::write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
7315* [`UnixStream::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.set_nonblocking)
7316* [`UnixStream::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.take_error)
7317* [`UnixStream::shutdown`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.shutdown)
a7813a04 7318* Read/Write/RawFd impls for `UnixStream`
7cac9316
XL
7319* [`UnixListener::bind`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.bind)
7320* [`UnixListener::accept`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.accept)
7321* [`UnixListener::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.try_clone)
7322* [`UnixListener::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.local_addr)
7323* [`UnixListener::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.set_nonblocking)
7324* [`UnixListener::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.take_error)
7325* [`UnixListener::incoming`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.incoming)
a7813a04 7326* RawFd impls for `UnixListener`
7cac9316
XL
7327* [`UnixDatagram::bind`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.bind)
7328* [`UnixDatagram::unbound`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.unbound)
7329* [`UnixDatagram::pair`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.pair)
7330* [`UnixDatagram::connect`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.connect)
7331* [`UnixDatagram::try_clone`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.try_clone)
7332* [`UnixDatagram::local_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.local_addr)
7333* [`UnixDatagram::peer_addr`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.peer_addr)
7334* [`UnixDatagram::recv_from`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv_from)
7335* [`UnixDatagram::recv`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv)
7336* [`UnixDatagram::send_to`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send_to)
7337* [`UnixDatagram::send`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send)
7338* [`UnixDatagram::set_read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_read_timeout)
7339* [`UnixDatagram::set_write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_write_timeout)
7340* [`UnixDatagram::read_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.read_timeout)
7341* [`UnixDatagram::write_timeout`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.write_timeout)
7342* [`UnixDatagram::set_nonblocking`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_nonblocking)
7343* [`UnixDatagram::take_error`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.take_error)
7344* [`UnixDatagram::shutdown`](http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.shutdown)
a7813a04
XL
7345* RawFd impls for `UnixDatagram`
7346* `{BTree,Hash}Map::values_mut`
74d20737 7347* [`<[_]>::binary_search_by_key`](http://doc.rust-lang.org/std/primitive.slice.html#method.binary_search_by_key)
a7813a04
XL
7348
7349Libraries
7350---------
7351
7cac9316 7352* [The `abs_sub` method of floats is deprecated](https://github.com/rust-lang/rust/pull/33664).
a7813a04
XL
7353 The semantics of this minor method are subtle and probably not what
7354 most people want.
7cac9316 7355* [Add implementation of Ord for Cell<T> and RefCell<T> where T: Ord](https://github.com/rust-lang/rust/pull/33306).
a7813a04
XL
7356* [On Linux, if `HashMap`s can't be initialized with `getrandom` they
7357 will fall back to `/dev/urandom` temporarily to avoid blocking
7cac9316
XL
7358 during early boot](https://github.com/rust-lang/rust/pull/33086).
7359* [Implemented negation for wrapping numerals](https://github.com/rust-lang/rust/pull/33067).
7360* [Implement `Clone` for `binary_heap::IntoIter`](https://github.com/rust-lang/rust/pull/33050).
7361* [Implement `Display` and `Hash` for `std::num::Wrapping`](https://github.com/rust-lang/rust/pull/33023).
7362* [Add `Default` implementation for `&CStr`, `CString`](https://github.com/rust-lang/rust/pull/32990).
7363* [Implement `From<Vec<T>>` and `Into<Vec<T>>` for `VecDeque<T>`](https://github.com/rust-lang/rust/pull/32866).
a7813a04 7364* [Implement `Default` for `UnsafeCell`, `fmt::Error`, `Condvar`,
7cac9316 7365 `Mutex`, `RwLock`](https://github.com/rust-lang/rust/pull/32785).
a7813a04
XL
7366
7367Cargo
7368-----
7cac9316 7369* [Cargo.toml supports the `profile.*.panic` option](https://github.com/rust-lang/cargo/pull/2687).
a7813a04
XL
7370 This controls the runtime behavior of the `panic!` macro
7371 and can be either "unwind" (the default), or "abort".
7372 [RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
7cac9316
XL
7373* [Don't throw away errors with `-p` arguments](https://github.com/rust-lang/cargo/pull/2723).
7374* [Report status to stderr instead of stdout](https://github.com/rust-lang/cargo/pull/2693).
a7813a04 7375* [Build scripts are passed a `CARGO_MANIFEST_LINKS` environment
7cac9316
XL
7376 variable that corresponds to the `links` field of the manifest](https://github.com/rust-lang/cargo/pull/2710).
7377* [Ban keywords from crate names](https://github.com/rust-lang/cargo/pull/2707).
7378* [Canonicalize `CARGO_HOME` on Windows](https://github.com/rust-lang/cargo/pull/2604).
7379* [Retry network requests](https://github.com/rust-lang/cargo/pull/2396).
a7813a04
XL
7380 By default they are retried twice, which can be customized with the
7381 `net.retry` value in `.cargo/config`.
7cac9316
XL
7382* [Don't print extra error info for failing subcommands](https://github.com/rust-lang/cargo/pull/2674).
7383* [Add `--force` flag to `cargo install`](https://github.com/rust-lang/cargo/pull/2405).
7384* [Don't use `flock` on NFS mounts](https://github.com/rust-lang/cargo/pull/2623).
7385* [Prefer building `cargo install` artifacts in temporary directories](https://github.com/rust-lang/cargo/pull/2610).
a7813a04 7386 Makes it possible to install multiple crates in parallel.
7cac9316
XL
7387* [Add `cargo test --doc`](https://github.com/rust-lang/cargo/pull/2578).
7388* [Add `cargo --explain`](https://github.com/rust-lang/cargo/pull/2551).
7389* [Don't print warnings when `-q` is passed](https://github.com/rust-lang/cargo/pull/2576).
7390* [Add `cargo doc --lib` and `--bin`](https://github.com/rust-lang/cargo/pull/2577).
7391* [Don't require build script output to be UTF-8](https://github.com/rust-lang/cargo/pull/2560).
7392* [Correctly attempt multiple git usernames](https://github.com/rust-lang/cargo/pull/2584).
a7813a04
XL
7393
7394Performance
7395-----------
7396
7397* [rustc memory usage was reduced by refactoring the context used for
7cac9316 7398 type checking](https://github.com/rust-lang/rust/pull/33425).
a7813a04 7399* [Speed up creation of `HashMap`s by caching the random keys used
7cac9316
XL
7400 to initialize the hash state](https://github.com/rust-lang/rust/pull/33318).
7401* [The `find` implementation for `Chain` iterators is 2x faster](https://github.com/rust-lang/rust/pull/33289).
7402* [Trait selection optimizations speed up type checking by 15%](https://github.com/rust-lang/rust/pull/33138).
7403* [Efficient trie lookup for boolean Unicode properties](https://github.com/rust-lang/rust/pull/33098).
a7813a04 7404 10x faster than the previous lookup tables.
7cac9316 7405* [Special case `#[derive(Copy, Clone)]` to avoid bloat](https://github.com/rust-lang/rust/pull/31414).
a7813a04
XL
7406
7407Usability
7408---------
7409
7410* Many incremental improvements to documentation and rustdoc.
7cac9316
XL
7411* [rustdoc: List blanket trait impls](https://github.com/rust-lang/rust/pull/33514).
7412* [rustdoc: Clean up ABI rendering](https://github.com/rust-lang/rust/pull/33151).
7413* [Indexing with the wrong type produces a more informative error](https://github.com/rust-lang/rust/pull/33401).
7414* [Improve diagnostics for constants being used in irrefutable patterns](https://github.com/rust-lang/rust/pull/33406).
7415* [When many method candidates are in scope limit the suggestions to 10](https://github.com/rust-lang/rust/pull/33338).
7416* [Remove confusing suggestion when calling a `fn` type](https://github.com/rust-lang/rust/pull/33325).
7417* [Do not suggest changing `&mut self` to `&mut mut self`](https://github.com/rust-lang/rust/pull/33319).
a7813a04
XL
7418
7419Misc
7420----
7421
7cac9316
XL
7422* [Update i686-linux-android features to match Android ABI](https://github.com/rust-lang/rust/pull/33651).
7423* [Update aarch64-linux-android features to match Android ABI](https://github.com/rust-lang/rust/pull/33500).
a7813a04
XL
7424* [`std` no longer prints backtraces on platforms where the running
7425 module must be loaded with `env::current_exe`, which can't be relied
7426 on](https://github.com/rust-lang/rust/pull/33554).
7427* This release includes std binaries for the i586-unknown-linux-gnu,
7428 i686-unknown-linux-musl, and armv7-linux-androideabi targets. The
7429 i586 target is for old x86 hardware without SSE2, and the armv7
7430 target is for Android running on modern ARM architectures.
7431* [The `rust-gdb` and `rust-lldb` scripts are distributed on all
7432 Unix platforms](https://github.com/rust-lang/rust/pull/32835).
7433* [On Unix the runtime aborts by calling `libc::abort` instead of
7cac9316 7434 generating an illegal instruction](https://github.com/rust-lang/rust/pull/31457).
a7813a04 7435* [Rust is now bootstrapped from the previous release of Rust,
7cac9316 7436 instead of a snapshot from an arbitrary commit](https://github.com/rust-lang/rust/pull/32942).
a7813a04
XL
7437
7438Compatibility Notes
7439-------------------
7440
7cac9316 7441* [`AtomicBool` is now bool-sized, not word-sized](https://github.com/rust-lang/rust/pull/33579).
a7813a04 7442* [`target_env` for Linux ARM targets is just `gnu`, not
7cac9316
XL
7443 `gnueabihf`, `gnueabi`, etc](https://github.com/rust-lang/rust/pull/33403).
7444* [Consistently panic on overflow in `Duration::new`](https://github.com/rust-lang/rust/pull/33072).
7445* [Change `String::truncate` to panic less](https://github.com/rust-lang/rust/pull/32977).
7446* [Add `:block` to the follow set for `:ty` and `:path`](https://github.com/rust-lang/rust/pull/32945).
a7813a04 7447 Affects how macros are parsed.
7cac9316 7448* [Fix macro hygiene bug](https://github.com/rust-lang/rust/pull/32923).
a7813a04 7449* [Feature-gated attributes on macro-generated macro invocations are
7cac9316
XL
7450 now rejected](https://github.com/rust-lang/rust/pull/32791).
7451* [Suppress fallback and ambiguity errors during type inference](https://github.com/rust-lang/rust/pull/32258).
a7813a04
XL
7452 This caused some minor changes to type inference.
7453
7454
54a0048b
SL
7455Version 1.9.0 (2016-05-26)
7456==========================
7457
7458Language
7459--------
7460
7461* The `#[deprecated]` attribute when applied to an API will generate
7462 warnings when used. The warnings may be suppressed with
7463 `#[allow(deprecated)]`. [RFC 1270].
7464* [`fn` item types are zero sized, and each `fn` names a unique
7465 type][1.9fn]. This will break code that transmutes `fn`s, so calling
7466 `transmute` on a `fn` type will generate a warning for a few cycles,
7467 then will be converted to an error.
7468* [Field and method resolution understand visibility, so private
7469 fields and methods cannot prevent the proper use of public fields
7470 and methods][1.9fv].
7471* [The parser considers unicode codepoints in the
7472 `PATTERN_WHITE_SPACE` category to be whitespace][1.9ws].
7473
7474Stabilized APIs
7475---------------
7476
7477* [`std::panic`]
dfeec247
XL
7478* [`std::panic::catch_unwind`] (renamed from `recover`)
7479* [`std::panic::resume_unwind`] (renamed from `propagate`)
7480* [`std::panic::AssertUnwindSafe`] (renamed from `AssertRecoverSafe`)
7481* [`std::panic::UnwindSafe`] (renamed from `RecoverSafe`)
54a0048b
SL
7482* [`str::is_char_boundary`]
7483* [`<*const T>::as_ref`]
7484* [`<*mut T>::as_ref`]
7485* [`<*mut T>::as_mut`]
7486* [`AsciiExt::make_ascii_uppercase`]
7487* [`AsciiExt::make_ascii_lowercase`]
7488* [`char::decode_utf16`]
7489* [`char::DecodeUtf16`]
7490* [`char::DecodeUtf16Error`]
7491* [`char::DecodeUtf16Error::unpaired_surrogate`]
7492* [`BTreeSet::take`]
7493* [`BTreeSet::replace`]
7494* [`BTreeSet::get`]
7495* [`HashSet::take`]
7496* [`HashSet::replace`]
7497* [`HashSet::get`]
7498* [`OsString::with_capacity`]
7499* [`OsString::clear`]
7500* [`OsString::capacity`]
7501* [`OsString::reserve`]
7502* [`OsString::reserve_exact`]
7503* [`OsStr::is_empty`]
7504* [`OsStr::len`]
7505* [`std::os::unix::thread`]
7506* [`RawPthread`]
7507* [`JoinHandleExt`]
7508* [`JoinHandleExt::as_pthread_t`]
7509* [`JoinHandleExt::into_pthread_t`]
7510* [`HashSet::hasher`]
7511* [`HashMap::hasher`]
7512* [`CommandExt::exec`]
7513* [`File::try_clone`]
7514* [`SocketAddr::set_ip`]
7515* [`SocketAddr::set_port`]
7516* [`SocketAddrV4::set_ip`]
7517* [`SocketAddrV4::set_port`]
7518* [`SocketAddrV6::set_ip`]
7519* [`SocketAddrV6::set_port`]
7520* [`SocketAddrV6::set_flowinfo`]
7521* [`SocketAddrV6::set_scope_id`]
7522* [`slice::copy_from_slice`]
7523* [`ptr::read_volatile`]
7524* [`ptr::write_volatile`]
7525* [`OpenOptions::create_new`]
7526* [`TcpStream::set_nodelay`]
7527* [`TcpStream::nodelay`]
7528* [`TcpStream::set_ttl`]
7529* [`TcpStream::ttl`]
7530* [`TcpStream::set_only_v6`]
7531* [`TcpStream::only_v6`]
7532* [`TcpStream::take_error`]
7533* [`TcpStream::set_nonblocking`]
7534* [`TcpListener::set_ttl`]
7535* [`TcpListener::ttl`]
7536* [`TcpListener::set_only_v6`]
7537* [`TcpListener::only_v6`]
7538* [`TcpListener::take_error`]
7539* [`TcpListener::set_nonblocking`]
7540* [`UdpSocket::set_broadcast`]
7541* [`UdpSocket::broadcast`]
7542* [`UdpSocket::set_multicast_loop_v4`]
7543* [`UdpSocket::multicast_loop_v4`]
7544* [`UdpSocket::set_multicast_ttl_v4`]
7545* [`UdpSocket::multicast_ttl_v4`]
7546* [`UdpSocket::set_multicast_loop_v6`]
7547* [`UdpSocket::multicast_loop_v6`]
7548* [`UdpSocket::set_multicast_ttl_v6`]
7549* [`UdpSocket::multicast_ttl_v6`]
7550* [`UdpSocket::set_ttl`]
7551* [`UdpSocket::ttl`]
7552* [`UdpSocket::set_only_v6`]
7553* [`UdpSocket::only_v6`]
7554* [`UdpSocket::join_multicast_v4`]
7555* [`UdpSocket::join_multicast_v6`]
7556* [`UdpSocket::leave_multicast_v4`]
7557* [`UdpSocket::leave_multicast_v6`]
7558* [`UdpSocket::take_error`]
7559* [`UdpSocket::connect`]
7560* [`UdpSocket::send`]
7561* [`UdpSocket::recv`]
7562* [`UdpSocket::set_nonblocking`]
7563
7564Libraries
7565---------
7566
7567* [`std::sync::Once` is poisoned if its initialization function
7568 fails][1.9o].
7569* [`cell::Ref` and `cell::RefMut` can contain unsized types][1.9cu].
7570* [Most types implement `fmt::Debug`][1.9db].
7571* [The default buffer size used by `BufReader` and `BufWriter` was
7572 reduced to 8K, from 64K][1.9bf]. This is in line with the buffer size
7573 used by other languages.
7574* [`Instant`, `SystemTime` and `Duration` implement `+=` and `-=`.
7575 `Duration` additionally implements `*=` and `/=`][1.9ta].
7576* [`Skip` is a `DoubleEndedIterator`][1.9sk].
7577* [`From<[u8; 4]>` is implemented for `Ipv4Addr`][1.9fi].
7578* [`Chain` implements `BufRead`][1.9ch].
7579* [`HashMap`, `HashSet` and iterators are covariant][1.9hc].
7580
7581Cargo
7582-----
7583
7584* [Cargo can now run concurrently][1.9cc].
7585* [Top-level overrides allow specific revisions of crates to be
7586 overridden through the entire crate graph][1.9ct]. This is intended
7587 to make upgrades easier for large projects, by allowing crates to be
7588 forked temporarily until they've been upgraded and republished.
7589* [Cargo exports a `CARGO_PKG_AUTHORS` environment variable][1.9cp].
7590* [Cargo will pass the contents of the `RUSTFLAGS` variable to `rustc`
7591 on the commandline][1.9cf]. `rustc` arguments can also be specified
7592 in the `build.rustflags` configuration key.
7593
7594Performance
7595-----------
7596
c30ab7b3 7597* [The time complexity of comparing variables for equivalence during type
a7813a04
XL
7598 unification is reduced from _O_(_n_!) to _O_(_n_)][1.9tu]. This leads
7599 to major compilation time improvement in some scenarios.
54a0048b
SL
7600* [`ToString` is specialized for `str`, giving it the same performance
7601 as `to_owned`][1.9ts].
7602* [Spawning processes with `Command::output` no longer creates extra
7603 threads][1.9sp].
7604* [`#[derive(PartialEq)]` and `#[derive(PartialOrd)]` emit less code
7605 for C-like enums][1.9cl].
7606
7607Misc
7608----
7609
7610* [Passing the `--quiet` flag to a test runner will produce
7611 much-abbreviated output][1.9q].
7612* The Rust Project now publishes std binaries for the
7613 `mips-unknown-linux-musl`, `mipsel-unknown-linux-musl`, and
7614 `i586-pc-windows-msvc` targets.
7615
7616Compatibility Notes
7617-------------------
7618
7619* [`std::sync::Once` is poisoned if its initialization function
7620 fails][1.9o].
7621* [It is illegal to define methods with the same name in overlapping
7622 inherent `impl` blocks][1.9sn].
7623* [`fn` item types are zero sized, and each `fn` names a unique
7624 type][1.9fn]. This will break code that transmutes `fn`s, so calling
7625 `transmute` on a `fn` type will generate a warning for a few cycles,
7626 then will be converted to an error.
7627* [Improvements to const evaluation may trigger new errors when integer
7628 literals are out of range][1.9ce].
7629
7630
7631[1.9bf]: https://github.com/rust-lang/rust/pull/32695
7632[1.9cc]: https://github.com/rust-lang/cargo/pull/2486
7633[1.9ce]: https://github.com/rust-lang/rust/pull/30587
7634[1.9cf]: https://github.com/rust-lang/cargo/pull/2241
7635[1.9ch]: https://github.com/rust-lang/rust/pull/32541
7636[1.9cl]: https://github.com/rust-lang/rust/pull/31977
7637[1.9cp]: https://github.com/rust-lang/cargo/pull/2465
7638[1.9ct]: https://github.com/rust-lang/cargo/pull/2385
7639[1.9cu]: https://github.com/rust-lang/rust/pull/32652
7640[1.9db]: https://github.com/rust-lang/rust/pull/32054
7641[1.9fi]: https://github.com/rust-lang/rust/pull/32050
7642[1.9fn]: https://github.com/rust-lang/rust/pull/31710
7643[1.9fv]: https://github.com/rust-lang/rust/pull/31938
7644[1.9hc]: https://github.com/rust-lang/rust/pull/32635
7645[1.9o]: https://github.com/rust-lang/rust/pull/32325
7646[1.9q]: https://github.com/rust-lang/rust/pull/31887
7647[1.9sk]: https://github.com/rust-lang/rust/pull/31700
7648[1.9sn]: https://github.com/rust-lang/rust/pull/31925
7649[1.9sp]: https://github.com/rust-lang/rust/pull/31618
7650[1.9ta]: https://github.com/rust-lang/rust/pull/32448
7651[1.9ts]: https://github.com/rust-lang/rust/pull/32586
7652[1.9tu]: https://github.com/rust-lang/rust/pull/32062
7653[1.9ws]: https://github.com/rust-lang/rust/pull/29734
7654[RFC 1270]: https://github.com/rust-lang/rfcs/blob/master/text/1270-deprecation.md
7655[`<*const T>::as_ref`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_ref
7656[`<*mut T>::as_mut`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_mut
7657[`<*mut T>::as_ref`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_ref
7658[`slice::copy_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.copy_from_slice
7659[`AsciiExt::make_ascii_lowercase`]: http://doc.rust-lang.org/nightly/std/ascii/trait.AsciiExt.html#tymethod.make_ascii_lowercase
7660[`AsciiExt::make_ascii_uppercase`]: http://doc.rust-lang.org/nightly/std/ascii/trait.AsciiExt.html#tymethod.make_ascii_uppercase
7661[`BTreeSet::get`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.get
7662[`BTreeSet::replace`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.replace
7663[`BTreeSet::take`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.take
7664[`CommandExt::exec`]: http://doc.rust-lang.org/nightly/std/os/unix/process/trait.CommandExt.html#tymethod.exec
7665[`File::try_clone`]: http://doc.rust-lang.org/nightly/std/fs/struct.File.html#method.try_clone
7666[`HashMap::hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.hasher
7667[`HashSet::get`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.get
7668[`HashSet::hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.hasher
7669[`HashSet::replace`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.replace
7670[`HashSet::take`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.take
7671[`JoinHandleExt::as_pthread_t`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html#tymethod.as_pthread_t
7672[`JoinHandleExt::into_pthread_t`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html#tymethod.into_pthread_t
7673[`JoinHandleExt`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html
7674[`OpenOptions::create_new`]: http://doc.rust-lang.org/nightly/std/fs/struct.OpenOptions.html#method.create_new
7675[`OsStr::is_empty`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsStr.html#method.is_empty
7676[`OsStr::len`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsStr.html#method.len
7677[`OsString::capacity`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.capacity
7678[`OsString::clear`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.clear
7679[`OsString::reserve_exact`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.reserve_exact
7680[`OsString::reserve`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.reserve
7681[`OsString::with_capacity`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.with_capacity
7682[`RawPthread`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/type.RawPthread.html
7683[`SocketAddr::set_ip`]: http://doc.rust-lang.org/nightly/std/net/enum.SocketAddr.html#method.set_ip
7684[`SocketAddr::set_port`]: http://doc.rust-lang.org/nightly/std/net/enum.SocketAddr.html#method.set_port
7685[`SocketAddrV4::set_ip`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV4.html#method.set_ip
7686[`SocketAddrV4::set_port`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV4.html#method.set_port
7687[`SocketAddrV6::set_flowinfo`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_flowinfo
7688[`SocketAddrV6::set_ip`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_ip
7689[`SocketAddrV6::set_port`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_port
7690[`SocketAddrV6::set_scope_id`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_scope_id
7691[`TcpListener::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.only_v6
7692[`TcpListener::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nonblocking
7693[`TcpListener::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_only_v6
7694[`TcpListener::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_ttl
7695[`TcpListener::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.take_error
7696[`TcpListener::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.ttl
7697[`TcpStream::nodelay`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.nodelay
7698[`TcpStream::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.only_v6
7699[`TcpStream::set_nodelay`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nodelay
7700[`TcpStream::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nonblocking
7701[`TcpStream::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_only_v6
7702[`TcpStream::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_ttl
7703[`TcpStream::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.take_error
7704[`TcpStream::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.ttl
7705[`UdpSocket::broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.broadcast
7706[`UdpSocket::connect`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.connect
7707[`UdpSocket::join_multicast_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.join_multicast_v4
7708[`UdpSocket::join_multicast_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.join_multicast_v6
7709[`UdpSocket::leave_multicast_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.leave_multicast_v4
7710[`UdpSocket::leave_multicast_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.leave_multicast_v6
7711[`UdpSocket::multicast_loop_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_loop_v4
7712[`UdpSocket::multicast_loop_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_loop_v6
7713[`UdpSocket::multicast_ttl_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_ttl_v4
7714[`UdpSocket::multicast_ttl_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_ttl_v6
7715[`UdpSocket::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.only_v6
7716[`UdpSocket::recv`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.recv
7717[`UdpSocket::send`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.send
7718[`UdpSocket::set_broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_broadcast
7719[`UdpSocket::set_multicast_loop_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_loop_v4
7720[`UdpSocket::set_multicast_loop_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_loop_v6
7721[`UdpSocket::set_multicast_ttl_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_ttl_v4
7722[`UdpSocket::set_multicast_ttl_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_ttl_v6
7723[`UdpSocket::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_nonblocking
7724[`UdpSocket::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_only_v6
7725[`UdpSocket::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_ttl
7726[`UdpSocket::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.take_error
7727[`UdpSocket::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.ttl
7728[`char::DecodeUtf16Error::unpaired_surrogate`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16Error.html#method.unpaired_surrogate
7729[`char::DecodeUtf16Error`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16Error.html
7730[`char::DecodeUtf16`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16.html
7731[`char::decode_utf16`]: http://doc.rust-lang.org/nightly/std/char/fn.decode_utf16.html
7732[`ptr::read_volatile`]: http://doc.rust-lang.org/nightly/std/ptr/fn.read_volatile.html
7733[`ptr::write_volatile`]: http://doc.rust-lang.org/nightly/std/ptr/fn.write_volatile.html
7734[`std::os::unix::thread`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/index.html
7735[`std::panic::AssertUnwindSafe`]: http://doc.rust-lang.org/nightly/std/panic/struct.AssertUnwindSafe.html
7736[`std::panic::UnwindSafe`]: http://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html
7737[`std::panic::catch_unwind`]: http://doc.rust-lang.org/nightly/std/panic/fn.catch_unwind.html
7738[`std::panic::resume_unwind`]: http://doc.rust-lang.org/nightly/std/panic/fn.resume_unwind.html
7739[`std::panic`]: http://doc.rust-lang.org/nightly/std/panic/index.html
7740[`str::is_char_boundary`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.is_char_boundary
7741
7742
7453a54e
SL
7743Version 1.8.0 (2016-04-14)
7744==========================
7745
7746Language
7747--------
7748
7749* Rust supports overloading of compound assignment statements like
7750 `+=` by implementing the [`AddAssign`], [`SubAssign`],
7751 [`MulAssign`], [`DivAssign`], [`RemAssign`], [`BitAndAssign`],
7752 [`BitOrAssign`], [`BitXorAssign`], [`ShlAssign`], or [`ShrAssign`]
7753 traits. [RFC 953].
7754* Empty structs can be defined with braces, as in `struct Foo { }`, in
7755 addition to the non-braced form, `struct Foo;`. [RFC 218].
7756
7757Libraries
7758---------
7759
7760* Stabilized APIs:
dfeec247
XL
7761 * [`str::encode_utf16`] (renamed from `utf16_units`)
7762 * [`str::EncodeUtf16`] (renamed from `Utf16Units`)
7453a54e
SL
7763 * [`Ref::map`]
7764 * [`RefMut::map`]
7765 * [`ptr::drop_in_place`]
7766 * [`time::Instant`]
7767 * [`time::SystemTime`]
7768 * [`Instant::now`]
dfeec247 7769 * [`Instant::duration_since`] (renamed from `duration_from_earlier`)
7453a54e
SL
7770 * [`Instant::elapsed`]
7771 * [`SystemTime::now`]
dfeec247 7772 * [`SystemTime::duration_since`] (renamed from `duration_from_earlier`)
7453a54e
SL
7773 * [`SystemTime::elapsed`]
7774 * Various `Add`/`Sub` impls for `Time` and `SystemTime`
7775 * [`SystemTimeError`]
7776 * [`SystemTimeError::duration`]
7777 * Various impls for `SystemTimeError`
7778 * [`UNIX_EPOCH`]
7779 * [`AddAssign`], [`SubAssign`], [`MulAssign`], [`DivAssign`],
7780 [`RemAssign`], [`BitAndAssign`], [`BitOrAssign`],
7781 [`BitXorAssign`], [`ShlAssign`], [`ShrAssign`].
7782* [The `write!` and `writeln!` macros correctly emit errors if any of
7783 their arguments can't be formatted][1.8w].
7784* [Various I/O functions support large files on 32-bit Linux][1.8l].
7785* [The Unix-specific `raw` modules, which contain a number of
7786 redefined C types are deprecated][1.8r], including `os::raw::unix`,
7787 `os::raw::macos`, and `os::raw::linux`. These modules defined types
7788 such as `ino_t` and `dev_t`. The inconsistency of these definitions
7789 across platforms was making it difficult to implement `std`
7790 correctly. Those that need these definitions should use the `libc`
7791 crate. [RFC 1415].
7792* The Unix-specific `MetadataExt` traits, including
7793 `os::unix::fs::MetadataExt`, which expose values such as inode
7794 numbers [no longer return platform-specific types][1.8r], but
7795 instead return widened integers. [RFC 1415].
7796* [`btree_set::{IntoIter, Iter, Range}` are covariant][1.8cv].
7797* [Atomic loads and stores are not volatile][1.8a].
7798* [All types in `sync::mpsc` implement `fmt::Debug`][1.8mp].
7799
7800Performance
7801-----------
7802
7803* [Inlining hash functions lead to a 3% compile-time improvement in
7804 some workloads][1.8h].
7805* When using jemalloc, its symbols are [unprefixed so that it
7806 overrides the libc malloc implementation][1.8h]. This means that for
7807 rustc, LLVM is now using jemalloc, which results in a 6%
7808 compile-time improvement on a specific workload.
7809* [Avoid quadratic growth in function size due to cleanups][1.8cu].
7810
7811Misc
7812----
7813
7814* [32-bit MSVC builds finally implement unwinding][1.8ms].
7815 i686-pc-windows-msvc is now considered a tier-1 platform.
7816* [The `--print targets` flag prints a list of supported targets][1.8t].
7817* [The `--print cfg` flag prints the `cfg`s defined for the current
7818 target][1.8cf].
7819* [`rustc` can be built with an new Cargo-based build system, written
7820 in Rust][1.8b]. It will eventually replace Rust's Makefile-based
7821 build system. To enable it configure with `configure --rustbuild`.
7822* [Errors for non-exhaustive `match` patterns now list up to 3 missing
7823 variants while also indicating the total number of missing variants
7824 if more than 3][1.8m].
7825* [Executable stacks are disabled on Linux and BSD][1.8nx].
7826* The Rust Project now publishes binary releases of the standard
7827 library for a number of tier-2 targets:
7828 `armv7-unknown-linux-gnueabihf`, `powerpc-unknown-linux-gnu`,
7829 `powerpc64-unknown-linux-gnu`, `powerpc64le-unknown-linux-gnu`
7830 `x86_64-rumprun-netbsd`. These can be installed with
7831 tools such as [multirust][1.8mr].
7832
7833Cargo
7834-----
7835
7836* [`cargo init` creates a new Cargo project in the current
7837 directory][1.8ci]. It is otherwise like `cargo new`.
7838* [Cargo has configuration keys for `-v` and
7839 `--color`][1.8cc]. `verbose` and `color`, respectively, go in the
7840 `[term]` section of `.cargo/config`.
7841* [Configuration keys that evaluate to strings or integers can be set
7842 via environment variables][1.8ce]. For example the `build.jobs` key
7843 can be set via `CARGO_BUILD_JOBS`. Environment variables take
7844 precedence over config files.
7845* [Target-specific dependencies support Rust `cfg` syntax for
7846 describing targets][1.8cfg] so that dependencies for multiple
7847 targets can be specified together. [RFC 1361].
7848* [The environment variables `CARGO_TARGET_ROOT`, `RUSTC`, and
7849 `RUSTDOC` take precedence over the `build.target-dir`,
7850 `build.rustc`, and `build.rustdoc` configuration values][1.8cv].
7851* [The child process tree is killed on Windows when Cargo is
7852 killed][1.8ck].
7853* [The `build.target` configuration value sets the target platform,
7854 like `--target`][1.8ct].
7855
7856Compatibility Notes
7857-------------------
7858
7859* [Unstable compiler flags have been further restricted][1.8u]. Since
7860 1.0 `-Z` flags have been considered unstable, and other flags that
7861 were considered unstable additionally required passing `-Z
7862 unstable-options` to access. Unlike unstable language and library
7863 features though, these options have been accessible on the stable
7864 release channel. Going forward, *new unstable flags will not be
7865 available on the stable release channel*, and old unstable flags
7866 will warn about their usage. In the future, all unstable flags will
7867 be unavailable on the stable release channel.
7868* [It is no longer possible to `match` on empty enum variants using
7869 the `Variant(..)` syntax][1.8v]. This has been a warning since 1.6.
7870* The Unix-specific `MetadataExt` traits, including
7871 `os::unix::fs::MetadataExt`, which expose values such as inode
7872 numbers [no longer return platform-specific types][1.8r], but
7873 instead return widened integers. [RFC 1415].
7874* [Modules sourced from the filesystem cannot appear within arbitrary
a7813a04 7875 blocks, but only within other modules][1.8mf].
7453a54e
SL
7876* [`--cfg` compiler flags are parsed strictly as identifiers][1.8c].
7877* On Unix, [stack overflow triggers a runtime abort instead of a
7878 SIGSEGV][1.8so].
7879* [`Command::spawn` and its equivalents return an error if any of
7880 its command-line arguments contain interior `NUL`s][1.8n].
7881* [Tuple and unit enum variants from other crates are in the type
7882 namespace][1.8tn].
7883* [On Windows `rustc` emits `.lib` files for the `staticlib` library
7884 type instead of `.a` files][1.8st]. Additionally, for the MSVC
7885 toolchain, `rustc` emits import libraries named `foo.dll.lib`
7886 instead of `foo.lib`.
7887
7888
7889[1.8a]: https://github.com/rust-lang/rust/pull/30962
7890[1.8b]: https://github.com/rust-lang/rust/pull/31123
7891[1.8c]: https://github.com/rust-lang/rust/pull/31530
7892[1.8cc]: https://github.com/rust-lang/cargo/pull/2397
7893[1.8ce]: https://github.com/rust-lang/cargo/pull/2398
7894[1.8cf]: https://github.com/rust-lang/rust/pull/31278
7895[1.8cfg]: https://github.com/rust-lang/cargo/pull/2328
7896[1.8ci]: https://github.com/rust-lang/cargo/pull/2081
7897[1.8ck]: https://github.com/rust-lang/cargo/pull/2370
7898[1.8ct]: https://github.com/rust-lang/cargo/pull/2335
7899[1.8cu]: https://github.com/rust-lang/rust/pull/31390
7900[1.8cv]: https://github.com/rust-lang/cargo/issues/2365
7901[1.8cv]: https://github.com/rust-lang/rust/pull/30998
7902[1.8h]: https://github.com/rust-lang/rust/pull/31460
7903[1.8l]: https://github.com/rust-lang/rust/pull/31668
7904[1.8m]: https://github.com/rust-lang/rust/pull/31020
a7813a04 7905[1.8mf]: https://github.com/rust-lang/rust/pull/31534
7453a54e
SL
7906[1.8mp]: https://github.com/rust-lang/rust/pull/30894
7907[1.8mr]: https://users.rust-lang.org/t/multirust-0-8-with-cross-std-installation/4901
7908[1.8ms]: https://github.com/rust-lang/rust/pull/30448
7909[1.8n]: https://github.com/rust-lang/rust/pull/31056
7910[1.8nx]: https://github.com/rust-lang/rust/pull/30859
7911[1.8r]: https://github.com/rust-lang/rust/pull/31551
7912[1.8so]: https://github.com/rust-lang/rust/pull/31333
7913[1.8st]: https://github.com/rust-lang/rust/pull/29520
7914[1.8t]: https://github.com/rust-lang/rust/pull/31358
7915[1.8tn]: https://github.com/rust-lang/rust/pull/30882
7916[1.8u]: https://github.com/rust-lang/rust/pull/31793
7917[1.8v]: https://github.com/rust-lang/rust/pull/31757
7918[1.8w]: https://github.com/rust-lang/rust/pull/31904
7919[RFC 1361]: https://github.com/rust-lang/rfcs/blob/master/text/1361-cargo-cfg-dependencies.md
7920[RFC 1415]: https://github.com/rust-lang/rfcs/blob/master/text/1415-trim-std-os.md
7921[RFC 218]: https://github.com/rust-lang/rfcs/blob/master/text/0218-empty-struct-with-braces.md
7922[RFC 953]: https://github.com/rust-lang/rfcs/blob/master/text/0953-op-assign.md
7923[`AddAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.AddAssign.html
7924[`BitAndAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitAndAssign.html
7925[`BitOrAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitOrAssign.html
7926[`BitXorAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitXorAssign.html
7927[`DivAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.DivAssign.html
7928[`Instant::duration_since`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.duration_since
7929[`Instant::elapsed`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.elapsed
7930[`Instant::now`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.now
7931[`MulAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.MulAssign.html
7932[`Ref::map`]: http://doc.rust-lang.org/nightly/std/cell/struct.Ref.html#method.map
7933[`RefMut::map`]: http://doc.rust-lang.org/nightly/std/cell/struct.RefMut.html#method.map
7934[`RemAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.RemAssign.html
7935[`ShlAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.ShlAssign.html
7936[`ShrAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.ShrAssign.html
7937[`SubAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.SubAssign.html
7938[`SystemTime::duration_since`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.duration_since
7939[`SystemTime::elapsed`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.elapsed
7940[`SystemTime::now`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.now
7941[`SystemTimeError::duration`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTimeError.html#method.duration
7942[`SystemTimeError`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTimeError.html
7943[`UNIX_EPOCH`]: http://doc.rust-lang.org/nightly/std/time/constant.UNIX_EPOCH.html
7944[`ptr::drop_in_place`]: http://doc.rust-lang.org/nightly/std/ptr/fn.drop_in_place.html
7945[`str::EncodeUtf16`]: http://doc.rust-lang.org/nightly/std/str/struct.EncodeUtf16.html
7946[`str::encode_utf16`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.encode_utf16
7947[`time::Instant`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html
7948[`time::SystemTime`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html
7949
7950
9cc50fc6
SL
7951Version 1.7.0 (2016-03-03)
7952==========================
7953
7954Libraries
7955---------
7956
7957* Stabilized APIs
7958 * `Path`
dfeec247
XL
7959 * [`Path::strip_prefix`] (renamed from relative_from)
7960 * [`path::StripPrefixError`] (new error type returned from strip_prefix)
9cc50fc6
SL
7961 * `Ipv4Addr`
7962 * [`Ipv4Addr::is_loopback`]
7963 * [`Ipv4Addr::is_private`]
7964 * [`Ipv4Addr::is_link_local`]
7965 * [`Ipv4Addr::is_multicast`]
7966 * [`Ipv4Addr::is_broadcast`]
7967 * [`Ipv4Addr::is_documentation`]
7968 * `Ipv6Addr`
7969 * [`Ipv6Addr::is_unspecified`]
7970 * [`Ipv6Addr::is_loopback`]
7971 * [`Ipv6Addr::is_multicast`]
7972 * `Vec`
7973 * [`Vec::as_slice`]
7974 * [`Vec::as_mut_slice`]
7975 * `String`
7976 * [`String::as_str`]
7977 * [`String::as_mut_str`]
7978 * Slices
7979 * `<[T]>::`[`clone_from_slice`], which now requires the two slices to
7980 be the same length
7981 * `<[T]>::`[`sort_by_key`]
7982 * checked, saturated, and overflowing operations
7983 * [`i32::checked_rem`], [`i32::checked_neg`], [`i32::checked_shl`], [`i32::checked_shr`]
7984 * [`i32::saturating_mul`]
7985 * [`i32::overflowing_add`], [`i32::overflowing_sub`], [`i32::overflowing_mul`], [`i32::overflowing_div`]
7986 * [`i32::overflowing_rem`], [`i32::overflowing_neg`], [`i32::overflowing_shl`], [`i32::overflowing_shr`]
7987 * [`u32::checked_rem`], [`u32::checked_neg`], [`u32::checked_shl`], [`u32::checked_shl`]
7988 * [`u32::saturating_mul`]
7989 * [`u32::overflowing_add`], [`u32::overflowing_sub`], [`u32::overflowing_mul`], [`u32::overflowing_div`]
7990 * [`u32::overflowing_rem`], [`u32::overflowing_neg`], [`u32::overflowing_shl`], [`u32::overflowing_shr`]
7991 * and checked, saturated, and overflowing operations for other primitive types
7992 * FFI
7993 * [`ffi::IntoStringError`]
7994 * [`CString::into_string`]
7995 * [`CString::into_bytes`]
7996 * [`CString::into_bytes_with_nul`]
7997 * `From<CString> for Vec<u8>`
7998 * `IntoStringError`
7999 * [`IntoStringError::into_cstring`]
8000 * [`IntoStringError::utf8_error`]
8001 * `Error for IntoStringError`
54a0048b
SL
8002 * Hashing
8003 * [`std::hash::BuildHasher`]
8004 * [`BuildHasher::Hasher`]
8005 * [`BuildHasher::build_hasher`]
8006 * [`std::hash::BuildHasherDefault`]
8007 * [`HashMap::with_hasher`]
8008 * [`HashMap::with_capacity_and_hasher`]
8009 * [`HashSet::with_hasher`]
8010 * [`HashSet::with_capacity_and_hasher`]
8011 * [`std::collections::hash_map::RandomState`]
8012 * [`RandomState::new`]
9cc50fc6
SL
8013* [Validating UTF-8 is faster by a factor of between 7 and 14x for
8014 ASCII input][1.7utf8]. This means that creating `String`s and `str`s
8015 from bytes is faster.
8016* [The performance of `LineWriter` (and thus `io::stdout`) was
8017 improved by using `memchr` to search for newlines][1.7m].
8018* [`f32::to_degrees` and `f32::to_radians` are stable][1.7f]. The
8019 `f64` variants were stabilized previously.
8020* [`BTreeMap` was rewritten to use less memory and improve the performance
8021 of insertion and iteration, the latter by as much as 5x][1.7bm].
8022* [`BTreeSet` and its iterators, `Iter`, `IntoIter`, and `Range` are
8023 covariant over their contained type][1.7bt].
8024* [`LinkedList` and its iterators, `Iter` and `IntoIter` are covariant
8025 over their contained type][1.7ll].
8026* [`str::replace` now accepts a `Pattern`][1.7rp], like other string
8027 searching methods.
8028* [`Any` is implemented for unsized types][1.7a].
8029* [`Hash` is implemented for `Duration`][1.7h].
8030
8031Misc
8032----
8033
8034* [When running tests with `--test`, rustdoc will pass `--cfg`
8035 arguments to the compiler][1.7dt].
8036* [The compiler is built with RPATH information by default][1.7rpa].
8037 This means that it will be possible to run `rustc` when installed in
8038 unusual configurations without configuring the dynamic linker search
8039 path explicitly.
8040* [`rustc` passes `--enable-new-dtags` to GNU ld][1.7dta]. This makes
8041 any RPATH entries (emitted with `-C rpath`) *not* take precedence
8042 over `LD_LIBRARY_PATH`.
8043
8044Cargo
8045-----
8046
8047* [`cargo rustc` accepts a `--profile` flag that runs `rustc` under
8048 any of the compilation profiles, 'dev', 'bench', or 'test'][1.7cp].
8049* [The `rerun-if-changed` build script directive no longer causes the
8050 build script to incorrectly run twice in certain scenarios][1.7rr].
8051
8052Compatibility Notes
8053-------------------
8054
54a0048b
SL
8055* Soundness fixes to the interactions between associated types and
8056 lifetimes, specified in [RFC 1214], [now generate errors][1.7sf] for
8057 code that violates the new rules. This is a significant change that
8058 is known to break existing code, so it has emitted warnings for the
8059 new error cases since 1.4 to give crate authors time to adapt. The
8060 details of what is changing are subtle; read the RFC for more.
9cc50fc6
SL
8061* [Several bugs in the compiler's visibility calculations were
8062 fixed][1.7v]. Since this was found to break significant amounts of
8063 code, the new errors will be emitted as warnings for several release
8064 cycles, under the `private_in_public` lint.
8065* Defaulted type parameters were accidentally accepted in positions
8066 that were not intended. In this release, [defaulted type parameters
8067 appearing outside of type definitions will generate a
8068 warning][1.7d], which will become an error in future releases.
54a0048b
SL
8069* [Parsing "." as a float results in an error instead of 0][1.7p].
8070 That is, `".".parse::<f32>()` returns `Err`, not `Ok(0.0)`.
9cc50fc6
SL
8071* [Borrows of closure parameters may not outlive the closure][1.7bc].
8072
8073[1.7a]: https://github.com/rust-lang/rust/pull/30928
8074[1.7bc]: https://github.com/rust-lang/rust/pull/30341
8075[1.7bm]: https://github.com/rust-lang/rust/pull/30426
8076[1.7bt]: https://github.com/rust-lang/rust/pull/30998
8077[1.7cp]: https://github.com/rust-lang/cargo/pull/2224
8078[1.7d]: https://github.com/rust-lang/rust/pull/30724
8079[1.7dt]: https://github.com/rust-lang/rust/pull/30372
8080[1.7dta]: https://github.com/rust-lang/rust/pull/30394
8081[1.7f]: https://github.com/rust-lang/rust/pull/30672
8082[1.7h]: https://github.com/rust-lang/rust/pull/30818
8083[1.7ll]: https://github.com/rust-lang/rust/pull/30663
8084[1.7m]: https://github.com/rust-lang/rust/pull/30381
8085[1.7p]: https://github.com/rust-lang/rust/pull/30681
8086[1.7rp]: https://github.com/rust-lang/rust/pull/29498
8087[1.7rpa]: https://github.com/rust-lang/rust/pull/30353
8088[1.7rr]: https://github.com/rust-lang/cargo/pull/2279
8089[1.7sf]: https://github.com/rust-lang/rust/pull/30389
8090[1.7utf8]: https://github.com/rust-lang/rust/pull/30740
8091[1.7v]: https://github.com/rust-lang/rust/pull/29973
8092[RFC 1214]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
54a0048b
SL
8093[`BuildHasher::Hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hasher.html
8094[`BuildHasher::build_hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.BuildHasher.html#tymethod.build_hasher
9cc50fc6
SL
8095[`CString::into_bytes_with_nul`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_bytes_with_nul
8096[`CString::into_bytes`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_bytes
8097[`CString::into_string`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_string
54a0048b
SL
8098[`HashMap::with_capacity_and_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.with_capacity_and_hasher
8099[`HashMap::with_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.with_hasher
8100[`HashSet::with_capacity_and_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.with_capacity_and_hasher
8101[`HashSet::with_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.with_hasher
9cc50fc6
SL
8102[`IntoStringError::into_cstring`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html#method.into_cstring
8103[`IntoStringError::utf8_error`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html#method.utf8_error
8104[`Ipv4Addr::is_broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_broadcast
8105[`Ipv4Addr::is_documentation`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_documentation
8106[`Ipv4Addr::is_link_local`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_link_local
8107[`Ipv4Addr::is_loopback`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_loopback
8108[`Ipv4Addr::is_multicast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_multicast
8109[`Ipv4Addr::is_private`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_private
8110[`Ipv6Addr::is_loopback`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_loopback
8111[`Ipv6Addr::is_multicast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_multicast
8112[`Ipv6Addr::is_unspecified`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_unspecified
8113[`Path::strip_prefix`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.strip_prefix
54a0048b 8114[`RandomState::new`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html#method.new
9cc50fc6
SL
8115[`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_mut_str
8116[`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_str
8117[`Vec::as_mut_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_mut_slice
8118[`Vec::as_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_slice
54a0048b 8119[`clone_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.clone_from_slice
9cc50fc6
SL
8120[`ffi::IntoStringError`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html
8121[`i32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_neg
8122[`i32::checked_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_rem
8123[`i32::checked_shl`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_shl
8124[`i32::checked_shr`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_shr
8125[`i32::overflowing_add`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_add
8126[`i32::overflowing_div`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_div
8127[`i32::overflowing_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_mul
8128[`i32::overflowing_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_neg
8129[`i32::overflowing_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_rem
8130[`i32::overflowing_shl`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_shl
8131[`i32::overflowing_shr`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_shr
8132[`i32::overflowing_sub`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_sub
8133[`i32::saturating_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.saturating_mul
8134[`path::StripPrefixError`]: http://doc.rust-lang.org/nightly/std/path/struct.StripPrefixError.html
54a0048b
SL
8135[`sort_by_key`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_key
8136[`std::collections::hash_map::RandomState`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html
8137[`std::hash::BuildHasherDefault`]: http://doc.rust-lang.org/nightly/std/hash/struct.BuildHasherDefault.html
8138[`std::hash::BuildHasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.BuildHasher.html
9cc50fc6
SL
8139[`u32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_neg
8140[`u32::checked_rem`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_rem
54a0048b 8141[`u32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_neg
9cc50fc6
SL
8142[`u32::checked_shl`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_shl
8143[`u32::overflowing_add`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_add
8144[`u32::overflowing_div`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_div
8145[`u32::overflowing_mul`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_mul
8146[`u32::overflowing_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_neg
8147[`u32::overflowing_rem`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_rem
8148[`u32::overflowing_shl`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_shl
8149[`u32::overflowing_shr`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_shr
8150[`u32::overflowing_sub`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_sub
8151[`u32::saturating_mul`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.saturating_mul
8152
8153
92a42be0
SL
8154Version 1.6.0 (2016-01-21)
8155==========================
8156
8157Language
8158--------
8159
8160* The `#![no_std]` attribute causes a crate to not be linked to the
8161 standard library, but only the [core library][1.6co], as described
8162 in [RFC 1184]. The core library defines common types and traits but
8163 has no platform dependencies whatsoever, and is the basis for Rust
8164 software in environments that cannot support a full port of the
8165 standard library, such as operating systems. Most of the core
8166 library is now stable.
8167
8168Libraries
8169---------
8170
8171* Stabilized APIs:
9cc50fc6 8172 [`Read::read_exact`],
dfeec247 8173 [`ErrorKind::UnexpectedEof`] (renamed from `UnexpectedEOF`),
9cc50fc6 8174 [`fs::DirBuilder`], [`fs::DirBuilder::new`],
92a42be0
SL
8175 [`fs::DirBuilder::recursive`], [`fs::DirBuilder::create`],
8176 [`os::unix::fs::DirBuilderExt`],
8177 [`os::unix::fs::DirBuilderExt::mode`], [`vec::Drain`],
8178 [`vec::Vec::drain`], [`string::Drain`], [`string::String::drain`],
8179 [`vec_deque::Drain`], [`vec_deque::VecDeque::drain`],
8180 [`collections::hash_map::Drain`],
8181 [`collections::hash_map::HashMap::drain`],
8182 [`collections::hash_set::Drain`],
8183 [`collections::hash_set::HashSet::drain`],
8184 [`collections::binary_heap::Drain`],
8185 [`collections::binary_heap::BinaryHeap::drain`],
dfeec247 8186 [`Vec::extend_from_slice`] (renamed from `push_all`),
92a42be0 8187 [`Mutex::get_mut`], [`Mutex::into_inner`], [`RwLock::get_mut`],
9cc50fc6 8188 [`RwLock::into_inner`],
dfeec247
XL
8189 [`Iterator::min_by_key`] (renamed from `min_by`),
8190 [`Iterator::max_by_key`] (renamed from `max_by`).
92a42be0
SL
8191* The [core library][1.6co] is stable, as are most of its APIs.
8192* [The `assert_eq!` macro supports arguments that don't implement
8193 `Sized`][1.6ae], such as arrays. In this way it behaves more like
8194 `assert!`.
8195* Several timer functions that take duration in milliseconds [are
8196 deprecated in favor of those that take `Duration`][1.6ms]. These
8197 include `Condvar::wait_timeout_ms`, `thread::sleep_ms`, and
9cc50fc6 8198 `thread::park_timeout_ms`.
92a42be0
SL
8199* The algorithm by which `Vec` reserves additional elements was
8200 [tweaked to not allocate excessive space][1.6a] while still growing
8201 exponentially.
8202* `From` conversions are [implemented from integers to floats][1.6f]
8203 in cases where the conversion is lossless. Thus they are not
8204 implemented for 32-bit ints to `f32`, nor for 64-bit ints to `f32`
8205 or `f64`. They are also not implemented for `isize` and `usize`
8206 because the implementations would be platform-specific. `From` is
8207 also implemented from `f32` to `f64`.
8208* `From<&Path>` and `From<PathBuf>` are implemented for `Cow<Path>`.
8209* `From<T>` is implemented for `Box<T>`, `Rc<T>` and `Arc<T>`.
8210* `IntoIterator` is implemented for `&PathBuf` and `&Path`.
8211* [`BinaryHeap` was refactored][1.6bh] for modest performance
8212 improvements.
8213* Sorting slices that are already sorted [is 50% faster in some
8214 cases][1.6s].
8215
8216Cargo
8217-----
8218
8219* Cargo will look in `$CARGO_HOME/bin` for subcommands [by default][1.6c].
8220* Cargo build scripts can specify their dependencies by emitting the
8221 [`rerun-if-changed`][1.6rr] key.
8222* crates.io will reject publication of crates with dependencies that
8223 have a wildcard version constraint. Crates with wildcard
8224 dependencies were seen to cause a variety of problems, as described
9cc50fc6
SL
8225 in [RFC 1241]. Since 1.5 publication of such crates has emitted a
8226 warning.
92a42be0
SL
8227* `cargo clean` [accepts a `--release` flag][1.6cc] to clean the
8228 release folder. A variety of artifacts that Cargo failed to clean
8229 are now correctly deleted.
8230
8231Misc
8232----
8233
8234* The `unreachable_code` lint [warns when a function call's argument
8235 diverges][1.6dv].
8236* The parser indicates [failures that may be caused by
8237 confusingly-similar Unicode characters][1.6uc]
8238* Certain macro errors [are reported at definition time][1.6m], not
8239 expansion.
8240
8241Compatibility Notes
8242-------------------
8243
8244* The compiler no longer makes use of the [`RUST_PATH`][1.6rp]
8245 environment variable when locating crates. This was a pre-cargo
8246 feature for integrating with the package manager that was
8247 accidentally never removed.
8248* [A number of bugs were fixed in the privacy checker][1.6p] that
8249 could cause previously-accepted code to break.
8250* [Modules and unit/tuple structs may not share the same name][1.6ts].
9cc50fc6
SL
8251* [Bugs in pattern matching unit structs were fixed][1.6us]. The tuple
8252 struct pattern syntax (`Foo(..)`) can no longer be used to match
8253 unit structs. This is a warning now, but will become an error in
8254 future releases. Patterns that share the same name as a const are
8255 now an error.
92a42be0
SL
8256* A bug was fixed that causes [rustc not to apply default type
8257 parameters][1.6xc] when resolving certain method implementations of
8258 traits defined in other crates.
8259
8260[1.6a]: https://github.com/rust-lang/rust/pull/29454
8261[1.6ae]: https://github.com/rust-lang/rust/pull/29770
8262[1.6bh]: https://github.com/rust-lang/rust/pull/29811
8263[1.6c]: https://github.com/rust-lang/cargo/pull/2192
8264[1.6cc]: https://github.com/rust-lang/cargo/pull/2131
74d20737 8265[1.6co]: http://doc.rust-lang.org/core/index.html
92a42be0
SL
8266[1.6dv]: https://github.com/rust-lang/rust/pull/30000
8267[1.6f]: https://github.com/rust-lang/rust/pull/29129
8268[1.6m]: https://github.com/rust-lang/rust/pull/29828
8269[1.6ms]: https://github.com/rust-lang/rust/pull/29604
8270[1.6p]: https://github.com/rust-lang/rust/pull/29726
8271[1.6rp]: https://github.com/rust-lang/rust/pull/30034
8272[1.6rr]: https://github.com/rust-lang/cargo/pull/2134
8273[1.6s]: https://github.com/rust-lang/rust/pull/29675
8274[1.6ts]: https://github.com/rust-lang/rust/issues/21546
8275[1.6uc]: https://github.com/rust-lang/rust/pull/29837
8276[1.6us]: https://github.com/rust-lang/rust/pull/29383
8277[1.6xc]: https://github.com/rust-lang/rust/issues/30123
8278[RFC 1184]: https://github.com/rust-lang/rfcs/blob/master/text/1184-stabilize-no_std.md
8279[RFC 1241]: https://github.com/rust-lang/rfcs/blob/master/text/1241-no-wildcard-deps.md
8280[`ErrorKind::UnexpectedEof`]: http://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html#variant.UnexpectedEof
8281[`Iterator::max_by_key`]: http://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.max_by_key
8282[`Iterator::min_by_key`]: http://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.min_by_key
8283[`Mutex::get_mut`]: http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html#method.get_mut
8284[`Mutex::into_inner`]: http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html#method.into_inner
8285[`Read::read_exact`]: http://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact
8286[`RwLock::get_mut`]: http://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html#method.get_mut
8287[`RwLock::into_inner`]: http://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html#method.into_inner
8288[`Vec::extend_from_slice`]: http://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html#method.extend_from_slice
8289[`collections::binary_heap::BinaryHeap::drain`]: http://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.BinaryHeap.html#method.drain
8290[`collections::binary_heap::Drain`]: http://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.Drain.html
8291[`collections::hash_map::Drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.Drain.html
8292[`collections::hash_map::HashMap::drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.HashMap.html#method.drain
8293[`collections::hash_set::Drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_set/struct.Drain.html
8294[`collections::hash_set::HashSet::drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_set/struct.HashSet.html#method.drain
8295[`fs::DirBuilder::create`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.create
8296[`fs::DirBuilder::new`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.new
8297[`fs::DirBuilder::recursive`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.recursive
8298[`fs::DirBuilder`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html
8299[`os::unix::fs::DirBuilderExt::mode`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html#tymethod.mode
8300[`os::unix::fs::DirBuilderExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html
8301[`string::Drain`]: http://doc.rust-lang.org/nightly/std/string/struct.Drain.html
8302[`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.drain
8303[`vec::Drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Drain.html
8304[`vec::Vec::drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.drain
8305[`vec_deque::Drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Drain.html
8306[`vec_deque::VecDeque::drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.VecDeque.html#method.drain
8307
8308
b039eaaf
SL
8309Version 1.5.0 (2015-12-10)
8310==========================
8311
8312* ~700 changes, numerous bugfixes
8313
8314Highlights
8315----------
8316
8317* Stabilized APIs:
8318 [`BinaryHeap::from`], [`BinaryHeap::into_sorted_vec`],
8319 [`BinaryHeap::into_vec`], [`Condvar::wait_timeout`],
8320 [`FileTypeExt::is_block_device`], [`FileTypeExt::is_char_device`],
8321 [`FileTypeExt::is_fifo`], [`FileTypeExt::is_socket`],
8322 [`FileTypeExt`], [`Formatter::alternate`], [`Formatter::fill`],
8323 [`Formatter::precision`], [`Formatter::sign_aware_zero_pad`],
8324 [`Formatter::sign_minus`], [`Formatter::sign_plus`],
8325 [`Formatter::width`], [`Iterator::cmp`], [`Iterator::eq`],
8326 [`Iterator::ge`], [`Iterator::gt`], [`Iterator::le`],
8327 [`Iterator::lt`], [`Iterator::ne`], [`Iterator::partial_cmp`],
8328 [`Path::canonicalize`], [`Path::exists`], [`Path::is_dir`],
8329 [`Path::is_file`], [`Path::metadata`], [`Path::read_dir`],
8330 [`Path::read_link`], [`Path::symlink_metadata`],
8331 [`Utf8Error::valid_up_to`], [`Vec::resize`],
8332 [`VecDeque::as_mut_slices`], [`VecDeque::as_slices`],
8333 [`VecDeque::insert`], [`VecDeque::shrink_to_fit`],
8334 [`VecDeque::swap_remove_back`], [`VecDeque::swap_remove_front`],
8335 [`slice::split_first_mut`], [`slice::split_first`],
8336 [`slice::split_last_mut`], [`slice::split_last`],
8337 [`char::from_u32_unchecked`], [`fs::canonicalize`],
8338 [`str::MatchIndices`], [`str::RMatchIndices`],
8339 [`str::match_indices`], [`str::rmatch_indices`],
8340 [`str::slice_mut_unchecked`], [`string::ParseError`].
8341* Rust applications hosted on crates.io can be installed locally to
8342 `~/.cargo/bin` with the [`cargo install`] command. Among other
8343 things this makes it easier to augment Cargo with new subcommands:
8344 when a binary named e.g. `cargo-foo` is found in `$PATH` it can be
8345 invoked as `cargo foo`.
8346* Crates with wildcard (`*`) dependencies will [emit warnings when
8347 published][1.5w]. In 1.6 it will no longer be possible to publish
8348 crates with wildcard dependencies.
8349
8350Breaking Changes
8351----------------
8352
8353* The rules determining when a particular lifetime must outlive
8354 a particular value (known as '[dropck]') have been [modified
8355 to not rely on parametricity][1.5p].
8356* [Implementations of `AsRef` and `AsMut` were added to `Box`, `Rc`,
8357 and `Arc`][1.5a]. Because these smart pointer types implement
8358 `Deref`, this causes breakage in cases where the interior type
8359 contains methods of the same name.
8360* [Correct a bug in Rc/Arc][1.5c] that caused [dropck] to be unaware
8361 that they could drop their content. Soundness fix.
8362* All method invocations are [properly checked][1.5wf1] for
8363 [well-formedness][1.5wf2]. Soundness fix.
8364* Traits whose supertraits contain `Self` are [not object
8365 safe][1.5o]. Soundness fix.
8366* Target specifications support a [`no_default_libraries`][1.5nd]
8367 setting that controls whether `-nodefaultlibs` is passed to the
8368 linker, and in turn the `is_like_windows` setting no longer affects
8369 the `-nodefaultlibs` flag.
8370* `#[derive(Show)]`, long-deprecated, [has been removed][1.5ds].
8371* The `#[inline]` and `#[repr]` attributes [can only appear
8372 in valid locations][1.5at].
8373* Native libraries linked from the local crate are [passed to
8374 the linker before native libraries from upstream crates][1.5nl].
8375* Two rarely-used attributes, `#[no_debug]` and
8376 `#[omit_gdb_pretty_printer_section]` [are feature gated][1.5fg].
8377* Negation of unsigned integers, which has been a warning for
8378 several releases, [is now behind a feature gate and will
8379 generate errors][1.5nu].
8380* The parser accidentally accepted visibility modifiers on
8381 enum variants, a bug [which has been fixed][1.5ev].
8382* [A bug was fixed that allowed `use` statements to import unstable
8383 features][1.5use].
8384
8385Language
8386--------
8387
8388* When evaluating expressions at compile-time that are not
8389 compile-time constants (const-evaluating expressions in non-const
8390 contexts), incorrect code such as overlong bitshifts and arithmetic
8391 overflow will [generate a warning instead of an error][1.5ce],
8392 delaying the error until runtime. This will allow the
8393 const-evaluator to be expanded in the future backwards-compatibly.
8394* The `improper_ctypes` lint [no longer warns about using `isize` and
8395 `usize` in FFI][1.5ict].
8396
8397Libraries
8398---------
8399
8400* `Arc<T>` and `Rc<T>` are [covariant with respect to `T` instead of
8401 invariant][1.5c].
8402* `Default` is [implemented for mutable slices][1.5d].
8403* `FromStr` is [implemented for `SockAddrV4` and `SockAddrV6`][1.5s].
8404* There are now `From` conversions [between floating point
8405 types][1.5f] where the conversions are lossless.
ff7c6d11 8406* There are now `From` conversions [between integer types][1.5i] where
b039eaaf
SL
8407 the conversions are lossless.
8408* [`fs::Metadata` implements `Clone`][1.5fs].
8409* The `parse` method [accepts a leading "+" when parsing
8410 integers][1.5pi].
8411* [`AsMut` is implemented for `Vec`][1.5am].
8412* The `clone_from` implementations for `String` and `BinaryHeap` [have
8413 been optimized][1.5cf] and no longer rely on the default impl.
8414* The `extern "Rust"`, `extern "C"`, `unsafe extern "Rust"` and
8415 `unsafe extern "C"` function types now [implement `Clone`,
8416 `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Hash`, `fmt::Pointer`, and
8417 `fmt::Debug` for up to 12 arguments][1.5fp].
8418* [Dropping `Vec`s is much faster in unoptimized builds when the
8419 element types don't implement `Drop`][1.5dv].
8420* A bug that caused in incorrect behavior when [combining `VecDeque`
8421 with zero-sized types][1.5vdz] was resolved.
8422* [`PartialOrd` for slices is faster][1.5po].
8423
8424Miscellaneous
8425-------------
8426
8427* [Crate metadata size was reduced by 20%][1.5md].
8428* [Improvements to code generation reduced the size of libcore by 3.3
8429 MB and rustc's memory usage by 18MB][1.5m].
8430* [Improvements to deref translation increased performance in
8431 unoptimized builds][1.5dr].
8432* Various errors in trait resolution [are deduplicated to only be
8433 reported once][1.5te].
8434* Rust has preliminary [support for rumprun kernels][1.5rr].
8435* Rust has preliminary [support for NetBSD on amd64][1.5na].
8436
8437[1.5use]: https://github.com/rust-lang/rust/pull/28364
8438[1.5po]: https://github.com/rust-lang/rust/pull/28436
8439[1.5ev]: https://github.com/rust-lang/rust/pull/28442
8440[1.5nu]: https://github.com/rust-lang/rust/pull/28468
8441[1.5dr]: https://github.com/rust-lang/rust/pull/28491
8442[1.5vdz]: https://github.com/rust-lang/rust/pull/28494
8443[1.5md]: https://github.com/rust-lang/rust/pull/28521
8444[1.5fg]: https://github.com/rust-lang/rust/pull/28522
8445[1.5dv]: https://github.com/rust-lang/rust/pull/28531
8446[1.5na]: https://github.com/rust-lang/rust/pull/28543
8447[1.5fp]: https://github.com/rust-lang/rust/pull/28560
8448[1.5rr]: https://github.com/rust-lang/rust/pull/28593
8449[1.5cf]: https://github.com/rust-lang/rust/pull/28602
8450[1.5nl]: https://github.com/rust-lang/rust/pull/28605
8451[1.5te]: https://github.com/rust-lang/rust/pull/28645
8452[1.5at]: https://github.com/rust-lang/rust/pull/28650
8453[1.5am]: https://github.com/rust-lang/rust/pull/28663
8454[1.5m]: https://github.com/rust-lang/rust/pull/28778
8455[1.5ict]: https://github.com/rust-lang/rust/pull/28779
8456[1.5a]: https://github.com/rust-lang/rust/pull/28811
8457[1.5pi]: https://github.com/rust-lang/rust/pull/28826
8458[1.5ce]: https://github.com/rust-lang/rfcs/blob/master/text/1229-compile-time-asserts.md
8459[1.5p]: https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md
8460[1.5i]: https://github.com/rust-lang/rust/pull/28921
8461[1.5fs]: https://github.com/rust-lang/rust/pull/29021
8462[1.5f]: https://github.com/rust-lang/rust/pull/29129
8463[1.5ds]: https://github.com/rust-lang/rust/pull/29148
8464[1.5s]: https://github.com/rust-lang/rust/pull/29190
8465[1.5d]: https://github.com/rust-lang/rust/pull/29245
8466[1.5o]: https://github.com/rust-lang/rust/pull/29259
8467[1.5nd]: https://github.com/rust-lang/rust/pull/28578
8468[1.5wf2]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
8469[1.5wf1]: https://github.com/rust-lang/rust/pull/28669
8470[dropck]: https://doc.rust-lang.org/nightly/nomicon/dropck.html
8471[1.5c]: https://github.com/rust-lang/rust/pull/29110
8472[1.5w]: https://github.com/rust-lang/rfcs/blob/master/text/1241-no-wildcard-deps.md
8473[`cargo install`]: https://github.com/rust-lang/rfcs/blob/master/text/1200-cargo-install.md
8474[`BinaryHeap::from`]: http://doc.rust-lang.org/nightly/std/convert/trait.From.html#method.from
8475[`BinaryHeap::into_sorted_vec`]: http://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html#method.into_sorted_vec
8476[`BinaryHeap::into_vec`]: http://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html#method.into_vec
8477[`Condvar::wait_timeout`]: http://doc.rust-lang.org/nightly/std/sync/struct.Condvar.html#method.wait_timeout
8478[`FileTypeExt::is_block_device`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_block_device
8479[`FileTypeExt::is_char_device`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_char_device
8480[`FileTypeExt::is_fifo`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_fifo
8481[`FileTypeExt::is_socket`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_socket
8482[`FileTypeExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html
8483[`Formatter::alternate`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.alternate
8484[`Formatter::fill`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.fill
8485[`Formatter::precision`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.precision
8486[`Formatter::sign_aware_zero_pad`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_aware_zero_pad
8487[`Formatter::sign_minus`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_minus
8488[`Formatter::sign_plus`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_plus
8489[`Formatter::width`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.width
8490[`Iterator::cmp`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp
8491[`Iterator::eq`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq
8492[`Iterator::ge`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge
8493[`Iterator::gt`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt
8494[`Iterator::le`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le
8495[`Iterator::lt`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt
8496[`Iterator::ne`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne
8497[`Iterator::partial_cmp`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp
8498[`Path::canonicalize`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.canonicalize
8499[`Path::exists`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.exists
8500[`Path::is_dir`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.is_dir
8501[`Path::is_file`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.is_file
8502[`Path::metadata`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.metadata
8503[`Path::read_dir`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.read_dir
8504[`Path::read_link`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.read_link
8505[`Path::symlink_metadata`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.symlink_metadata
8506[`Utf8Error::valid_up_to`]: http://doc.rust-lang.org/nightly/core/str/struct.Utf8Error.html#method.valid_up_to
8507[`Vec::resize`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.resize
8508[`VecDeque::as_mut_slices`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.as_mut_slices
8509[`VecDeque::as_slices`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.as_slices
8510[`VecDeque::insert`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.insert
8511[`VecDeque::shrink_to_fit`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.shrink_to_fit
8512[`VecDeque::swap_remove_back`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.swap_remove_back
8513[`VecDeque::swap_remove_front`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.swap_remove_front
8514[`slice::split_first_mut`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_first_mut
8515[`slice::split_first`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_first
8516[`slice::split_last_mut`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_last_mut
8517[`slice::split_last`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_last
8518[`char::from_u32_unchecked`]: http://doc.rust-lang.org/nightly/std/char/fn.from_u32_unchecked.html
8519[`fs::canonicalize`]: http://doc.rust-lang.org/nightly/std/fs/fn.canonicalize.html
8520[`str::MatchIndices`]: http://doc.rust-lang.org/nightly/std/str/struct.MatchIndices.html
8521[`str::RMatchIndices`]: http://doc.rust-lang.org/nightly/std/str/struct.RMatchIndices.html
8522[`str::match_indices`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.match_indices
8523[`str::rmatch_indices`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatch_indices
8524[`str::slice_mut_unchecked`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.slice_mut_unchecked
8525[`string::ParseError`]: http://doc.rust-lang.org/nightly/std/string/enum.ParseError.html
8526
8527Version 1.4.0 (2015-10-29)
8528==========================
e9174d1e
SL
8529
8530* ~1200 changes, numerous bugfixes
8531
8532Highlights
8533----------
8534
8535* Windows builds targeting the 64-bit MSVC ABI and linker (instead of
8536 GNU) are now supported and recommended for use.
8537
8538Breaking Changes
8539----------------
8540
8541* [Several changes have been made to fix type soundness and improve
8542 the behavior of associated types][sound]. See [RFC 1214]. Although
8543 we have mostly introduced these changes as warnings this release, to
8544 become errors next release, there are still some scenarios that will
8545 see immediate breakage.
8546* [The `str::lines` and `BufRead::lines` iterators treat `\r\n` as
8547 line breaks in addition to `\n`][crlf].
8548* [Loans of `'static` lifetime extend to the end of a function][stat].
b039eaaf
SL
8549* [`str::parse` no longer introduces avoidable rounding error when
8550 parsing floating point numbers. Together with earlier changes to
8551 float formatting/output, "round trips" like f.to_string().parse()
8552 now preserve the value of f exactly. Additionally, leading plus
8553 signs are now accepted][fp3].
8554
e9174d1e
SL
8555
8556Language
8557--------
8558
8559* `use` statements that import multiple items [can now rename
8560 them][i], as in `use foo::{bar as kitten, baz as puppy}`.
8561* [Binops work correctly on fat pointers][binfat].
8562* `pub extern crate`, which does not behave as expected, [issues a
8563 warning][pec] until a better solution is found.
8564
8565Libraries
8566---------
8567
8568* [Many APIs were stabilized][stab]: `<Box<str>>::into_string`,
8569 [`Arc::downgrade`], [`Arc::get_mut`], [`Arc::make_mut`],
8570 [`Arc::try_unwrap`], [`Box::from_raw`], [`Box::into_raw`], [`CStr::to_str`],
8571 [`CStr::to_string_lossy`], [`CString::from_raw`], [`CString::into_raw`],
8572 [`IntoRawFd::into_raw_fd`], [`IntoRawFd`],
8573 `IntoRawHandle::into_raw_handle`, `IntoRawHandle`,
8574 `IntoRawSocket::into_raw_socket`, `IntoRawSocket`, [`Rc::downgrade`],
8575 [`Rc::get_mut`], [`Rc::make_mut`], [`Rc::try_unwrap`], [`Result::expect`],
8576 [`String::into_boxed_str`], [`TcpStream::read_timeout`],
8577 [`TcpStream::set_read_timeout`], [`TcpStream::set_write_timeout`],
8578 [`TcpStream::write_timeout`], [`UdpSocket::read_timeout`],
8579 [`UdpSocket::set_read_timeout`], [`UdpSocket::set_write_timeout`],
8580 [`UdpSocket::write_timeout`], `Vec::append`, `Vec::split_off`,
8581 [`VecDeque::append`], [`VecDeque::retain`], [`VecDeque::split_off`],
8582 [`rc::Weak::upgrade`], [`rc::Weak`], [`slice::Iter::as_slice`],
8583 [`slice::IterMut::into_slice`], [`str::CharIndices::as_str`],
8584 [`str::Chars::as_str`], [`str::split_at_mut`], [`str::split_at`],
8585 [`sync::Weak::upgrade`], [`sync::Weak`], [`thread::park_timeout`],
8586 [`thread::sleep`].
8587* [Some APIs were deprecated][dep]: `BTreeMap::with_b`,
8588 `BTreeSet::with_b`, `Option::as_mut_slice`, `Option::as_slice`,
8589 `Result::as_mut_slice`, `Result::as_slice`, `f32::from_str_radix`,
8590 `f64::from_str_radix`.
8591* [Reverse-searching strings is faster with the 'two-way'
8592 algorithm][s].
8593* [`std::io::copy` allows `?Sized` arguments][cc].
8594* The `Windows`, `Chunks`, and `ChunksMut` iterators over slices all
dc3f5686 8595 [override `count`, `nth` and `last` with an *O*(1)
e9174d1e
SL
8596 implementation][it].
8597* [`Default` is implemented for arrays up to `[T; 32]`][d].
8598* [`IntoRawFd` has been added to the Unix-specific prelude,
8599 `IntoRawSocket` and `IntoRawHandle` to the Windows-specific
8600 prelude][pr].
8601* [`Extend<String>` and `FromIterator<String` are both implemented for
8602 `String`][es].
b039eaaf
SL
8603* [`IntoIterator` is implemented for references to `Option` and
8604 `Result`][into2].
e9174d1e 8605* [`HashMap` and `HashSet` implement `Extend<&T>` where `T:
ff7c6d11 8606 Copy`][ext] as part of [RFC 839]. This will cause type inference
b039eaaf 8607 breakage in rare situations.
e9174d1e
SL
8608* [`BinaryHeap` implements `Debug`][bh2].
8609* [`Borrow` and `BorrowMut` are implemented for fixed-size
8610 arrays][bm].
b039eaaf 8611* [`extern fn`s with the "Rust" and "C" ABIs implement common
e9174d1e
SL
8612 traits including `Eq`, `Ord`, `Debug`, `Hash`][fp].
8613* [String comparison is faster][faststr].
b039eaaf
SL
8614* `&mut T` where `T: std::fmt::Write` [also implements
8615 `std::fmt::Write`][mutw].
8616* [A stable regression in `VecDeque::push_back` and other
ff7c6d11 8617 capacity-altering methods that caused panics for zero-sized types
b039eaaf 8618 was fixed][vd].
e9174d1e
SL
8619* [Function pointers implement traits for up to 12 parameters][fp2].
8620
8621Miscellaneous
8622-------------
8623
8624* The compiler [no longer uses the 'morestack' feature to prevent
8625 stack overflow][mm]. Instead it uses guard pages and stack
8626 probes (though stack probes are not yet implemented on any platform
8627 but Windows).
8628* [The compiler matches traits faster when projections are involved][p].
8629* The 'improper_ctypes' lint [no longer warns about use of `isize` and
8630 `usize`][ffi].
8631* [Cargo now displays useful information about what its doing during
8632 `cargo update`][cu].
8633
8634[`Arc::downgrade`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.downgrade
8635[`Arc::make_mut`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.make_mut
8636[`Arc::get_mut`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.get_mut
8637[`Arc::try_unwrap`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.try_unwrap
8638[`Box::from_raw`]: http://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.from_raw
8639[`Box::into_raw`]: http://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.into_raw
8640[`CStr::to_str`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.to_str
8641[`CStr::to_string_lossy`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.to_string_lossy
8642[`CString::from_raw`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.from_raw
8643[`CString::into_raw`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_raw
8644[`IntoRawFd::into_raw_fd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.IntoRawFd.html#tymethod.into_raw_fd
8645[`IntoRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.IntoRawFd.html
8646[`Rc::downgrade`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.downgrade
8647[`Rc::get_mut`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.get_mut
8648[`Rc::make_mut`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.make_mut
8649[`Rc::try_unwrap`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.try_unwrap
8650[`Result::expect`]: http://doc.rust-lang.org/nightly/core/result/enum.Result.html#method.expect
8651[`String::into_boxed_str`]: http://doc.rust-lang.org/nightly/collections/string/struct.String.html#method.into_boxed_str
8652[`TcpStream::read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.read_timeout
8653[`TcpStream::set_read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_read_timeout
8654[`TcpStream::write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.write_timeout
8655[`TcpStream::set_write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_write_timeout
8656[`UdpSocket::read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.read_timeout
8657[`UdpSocket::set_read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_read_timeout
8658[`UdpSocket::write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.write_timeout
8659[`UdpSocket::set_write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_write_timeout
8660[`VecDeque::append`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.append
8661[`VecDeque::retain`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.retain
8662[`VecDeque::split_off`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.split_off
8663[`rc::Weak::upgrade`]: http://doc.rust-lang.org/nightly/std/rc/struct.Weak.html#method.upgrade
8664[`rc::Weak`]: http://doc.rust-lang.org/nightly/std/rc/struct.Weak.html
8665[`slice::Iter::as_slice`]: http://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#method.as_slice
8666[`slice::IterMut::into_slice`]: http://doc.rust-lang.org/nightly/std/slice/struct.IterMut.html#method.into_slice
8667[`str::CharIndices::as_str`]: http://doc.rust-lang.org/nightly/std/str/struct.CharIndices.html#method.as_str
8668[`str::Chars::as_str`]: http://doc.rust-lang.org/nightly/std/str/struct.Chars.html#method.as_str
8669[`str::split_at_mut`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_at_mut
8670[`str::split_at`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_at
8671[`sync::Weak::upgrade`]: http://doc.rust-lang.org/nightly/std/sync/struct.Weak.html#method.upgrade
8672[`sync::Weak`]: http://doc.rust-lang.org/nightly/std/sync/struct.Weak.html
8673[`thread::park_timeout`]: http://doc.rust-lang.org/nightly/std/thread/fn.park_timeout.html
8674[`thread::sleep`]: http://doc.rust-lang.org/nightly/std/thread/fn.sleep.html
8675[bh2]: https://github.com/rust-lang/rust/pull/28156
8676[binfat]: https://github.com/rust-lang/rust/pull/28270
8677[bm]: https://github.com/rust-lang/rust/pull/28197
8678[cc]: https://github.com/rust-lang/rust/pull/27531
8679[crlf]: https://github.com/rust-lang/rust/pull/28034
8680[cu]: https://github.com/rust-lang/cargo/pull/1931
8681[d]: https://github.com/rust-lang/rust/pull/27825
8682[dep]: https://github.com/rust-lang/rust/pull/28339
8683[es]: https://github.com/rust-lang/rust/pull/27956
8684[ext]: https://github.com/rust-lang/rust/pull/28094
8685[faststr]: https://github.com/rust-lang/rust/pull/28338
8686[ffi]: https://github.com/rust-lang/rust/pull/28779
8687[fp]: https://github.com/rust-lang/rust/pull/28268
8688[fp2]: https://github.com/rust-lang/rust/pull/28560
b039eaaf 8689[fp3]: https://github.com/rust-lang/rust/pull/27307
e9174d1e 8690[i]: https://github.com/rust-lang/rust/pull/27451
b039eaaf 8691[into2]: https://github.com/rust-lang/rust/pull/28039
e9174d1e
SL
8692[it]: https://github.com/rust-lang/rust/pull/27652
8693[mm]: https://github.com/rust-lang/rust/pull/27338
8694[mutw]: https://github.com/rust-lang/rust/pull/28368
8695[sound]: https://github.com/rust-lang/rust/pull/27641
8696[p]: https://github.com/rust-lang/rust/pull/27866
8697[pec]: https://github.com/rust-lang/rust/pull/28486
8698[pr]: https://github.com/rust-lang/rust/pull/27896
8699[RFC 839]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
8700[RFC 1214]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
8701[s]: https://github.com/rust-lang/rust/pull/27474
8702[stab]: https://github.com/rust-lang/rust/pull/28339
8703[stat]: https://github.com/rust-lang/rust/pull/28321
8704[vd]: https://github.com/rust-lang/rust/pull/28494
8705
8706Version 1.3.0 (2015-09-17)
c1a9b12d
SL
8707==============================
8708
8709* ~900 changes, numerous bugfixes
8710
8711Highlights
8712----------
8713
8714* The [new object lifetime defaults][nold] have been [turned
8715 on][nold2] after a cycle of warnings about the change. Now types
8716 like `&'a Box<Trait>` (or `&'a Rc<Trait>`, etc) will change from
8717 being interpreted as `&'a Box<Trait+'a>` to `&'a
8718 Box<Trait+'static>`.
8719* [The Rustonomicon][nom] is a new book in the official documentation
8720 that dives into writing unsafe Rust.
8721* The [`Duration`] API, [has been stabilized][ds]. This basic unit of
8722 timekeeping is employed by other std APIs, as well as out-of-tree
8723 time crates.
8724
8725Breaking Changes
8726----------------
8727
8728* The [new object lifetime defaults][nold] have been [turned
8729 on][nold2] after a cycle of warnings about the change.
8730* There is a known [regression][lr] in how object lifetime elision is
8731 interpreted, the proper solution for which is undetermined.
8732* The `#[prelude_import]` attribute, an internal implementation
8733 detail, was accidentally stabilized previously. [It has been put
8734 behind the `prelude_import` feature gate][pi]. This change is
8735 believed to break no existing code.
8736* The behavior of [`size_of_val`][dst1] and [`align_of_val`][dst2] is
8737 [more sane for dynamically sized types][dst3]. Code that relied on
8738 the previous behavior is thought to be broken.
8739* The `dropck` rules, which checks that destructors can't access
8740 destroyed values, [have been updated][dropck] to match the
8741 [RFC][dropckrfc]. This fixes some soundness holes, and as such will
8742 cause some previously-compiling code to no longer build.
8743
8744Language
8745--------
8746
8747* The [new object lifetime defaults][nold] have been [turned
8748 on][nold2] after a cycle of warnings about the change.
8749* Semicolons may [now follow types and paths in
8750 macros](https://github.com/rust-lang/rust/pull/27000).
8751* The behavior of [`size_of_val`][dst1] and [`align_of_val`][dst2] is
8752 [more sane for dynamically sized types][dst3]. Code that relied on
8753 the previous behavior is not known to exist, and suspected to be
8754 broken.
8755* `'static` variables [may now be recursive][st].
8756* `ref` bindings choose between [`Deref`] and [`DerefMut`]
8757 implementations correctly.
8758* The `dropck` rules, which checks that destructors can't access
8759 destroyed values, [have been updated][dropck] to match the
8760 [RFC][dropckrfc].
8761
8762Libraries
8763---------
8764
8765* The [`Duration`] API, [has been stabilized][ds], as well as the
8766 `std::time` module, which presently contains only `Duration`.
8767* `Box<str>` and `Box<[T]>` both implement `Clone`.
8768* The owned C string, [`CString`], implements [`Borrow`] and the
8769 borrowed C string, [`CStr`], implements [`ToOwned`]. The two of
8770 these allow C strings to be borrowed and cloned in generic code.
8771* [`CStr`] implements [`Debug`].
8772* [`AtomicPtr`] implements [`Debug`].
8773* [`Error`] trait objects [can be downcast to their concrete types][e]
8774 in many common configurations, using the [`is`], [`downcast`],
8775 [`downcast_ref`] and [`downcast_mut`] methods, similarly to the
8776 [`Any`] trait.
8777* Searching for substrings now [employs the two-way algorithm][search]
8778 instead of doing a naive search. This gives major speedups to a
8779 number of methods, including [`contains`][sc], [`find`][sf],
8780 [`rfind`][srf], [`split`][ss]. [`starts_with`][ssw] and
8781 [`ends_with`][sew] are also faster.
8782* The performance of `PartialEq` for slices is [much faster][ps].
8783* The [`Hash`] trait offers the default method, [`hash_slice`], which
8784 is overridden and optimized by the implementations for scalars.
8785* The [`Hasher`] trait now has a number of specialized `write_*`
8786 methods for primitive types, for efficiency.
8787* The I/O-specific error type, [`std::io::Error`][ie], gained a set of
8788 methods for accessing the 'inner error', if any: [`get_ref`][iegr],
8789 [`get_mut`][iegm], [`into_inner`][ieii]. As well, the implementation
8790 of [`std::error::Error::cause`][iec] also delegates to the inner
8791 error.
8792* [`process::Child`][pc] gained the [`id`] method, which returns a
8793 `u32` representing the platform-specific process identifier.
8794* The [`connect`] method on slices is deprecated, replaced by the new
8795 [`join`] method (note that both of these are on the *unstable*
8796 [`SliceConcatExt`] trait, but through the magic of the prelude are
8797 available to stable code anyway).
8798* The [`Div`] operator is implemented for [`Wrapping`] types.
8799* [`DerefMut` is implemented for `String`][dms].
8800* Performance of SipHash (the default hasher for `HashMap`) is
8801 [better for long data][sh].
8802* [`AtomicPtr`] implements [`Send`].
8803* The [`read_to_end`] implementations for [`Stdin`] and [`File`]
ff7c6d11 8804 are now [specialized to use uninitialized buffers for increased
c1a9b12d
SL
8805 performance][rte].
8806* Lifetime parameters of foreign functions [are now resolved
8807 properly][f].
8808
8809Misc
8810----
8811
8812* Rust can now, with some coercion, [produce programs that run on
8813 Windows XP][xp], though XP is not considered a supported platform.
8814* Porting Rust on Windows from the GNU toolchain to MSVC continues
8815 ([1][win1], [2][win2], [3][win3], [4][win4]). It is still not
8816 recommended for use in 1.3, though should be fully-functional
8817 in the [64-bit 1.4 beta][b14].
8818* On Fedora-based systems installation will [properly configure the
8819 dynamic linker][fl].
8820* The compiler gained many new extended error descriptions, which can
8821 be accessed with the `--explain` flag.
8822* The `dropck` pass, which checks that destructors can't access
8823 destroyed values, [has been rewritten][dropck]. This fixes some
8824 soundness holes, and as such will cause some previously-compiling
8825 code to no longer build.
8826* `rustc` now uses [LLVM to write archive files where possible][ar].
8827 Eventually this will eliminate the compiler's dependency on the ar
8828 utility.
8829* Rust has [preliminary support for i686 FreeBSD][fb] (it has long
8830 supported FreeBSD on x86_64).
8831* The [`unused_mut`][lum], [`unconditional_recursion`][lur],
8832 [`improper_ctypes`][lic], and [`negate_unsigned`][lnu] lints are
8833 more strict.
8834* If landing pads are disabled (with `-Z no-landing-pads`), [`panic!`
8835 will kill the process instead of leaking][nlp].
8836
8837[`Any`]: http://doc.rust-lang.org/nightly/std/any/trait.Any.html
8838[`AtomicPtr`]: http://doc.rust-lang.org/nightly/std/sync/atomic/struct.AtomicPtr.html
8839[`Borrow`]: http://doc.rust-lang.org/nightly/std/borrow/trait.Borrow.html
8840[`CStr`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html
8841[`CString`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html
8842[`Debug`]: http://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
8843[`DerefMut`]: http://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
8844[`Deref`]: http://doc.rust-lang.org/nightly/std/ops/trait.Deref.html
8845[`Div`]: http://doc.rust-lang.org/nightly/std/ops/trait.Div.html
8846[`Duration`]: http://doc.rust-lang.org/nightly/std/time/struct.Duration.html
8847[`Error`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html
8848[`File`]: http://doc.rust-lang.org/nightly/std/fs/struct.File.html
8849[`Hash`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html
e9174d1e 8850[`Hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hasher.html
c1a9b12d
SL
8851[`Send`]: http://doc.rust-lang.org/nightly/std/marker/trait.Send.html
8852[`SliceConcatExt`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html
8853[`Stdin`]: http://doc.rust-lang.org/nightly/std/io/struct.Stdin.html
8854[`ToOwned`]: http://doc.rust-lang.org/nightly/std/borrow/trait.ToOwned.html
8855[`Wrapping`]: http://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
8856[`connect`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html#method.connect
8857[`downcast_mut`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast_mut
8858[`downcast_ref`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast_ref
8859[`downcast`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast
8860[`hash_slice`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html#method.hash_slice
8861[`id`]: http://doc.rust-lang.org/nightly/std/process/struct.Child.html#method.id
8862[`is`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.is
8863[`join`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html#method.join
8864[`read_to_end`]: http://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end
8865[ar]: https://github.com/rust-lang/rust/pull/26926
8866[b14]: https://static.rust-lang.org/dist/rust-beta-x86_64-pc-windows-msvc.msi
8867[dms]: https://github.com/rust-lang/rust/pull/26241
8868[dropck]: https://github.com/rust-lang/rust/pull/27261
8869[dropckrfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
8870[ds]: https://github.com/rust-lang/rust/pull/26818
8871[dst1]: http://doc.rust-lang.org/nightly/std/mem/fn.size_of_val.html
8872[dst2]: http://doc.rust-lang.org/nightly/std/mem/fn.align_of_val.html
8873[dst3]: https://github.com/rust-lang/rust/pull/27351
8874[e]: https://github.com/rust-lang/rust/pull/24793
8875[f]: https://github.com/rust-lang/rust/pull/26588
8876[fb]: https://github.com/rust-lang/rust/pull/26959
8877[fl]: https://github.com/rust-lang/rust-installer/pull/41
8878[hs]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html#method.hash_slice
8879[ie]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html
8880[iec]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.cause
8881[iegm]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.get_mut
8882[iegr]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.get_ref
8883[ieii]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.into_inner
8884[lic]: https://github.com/rust-lang/rust/pull/26583
8885[lnu]: https://github.com/rust-lang/rust/pull/27026
8886[lr]: https://github.com/rust-lang/rust/issues/27248
8887[lum]: https://github.com/rust-lang/rust/pull/26378
8888[lur]: https://github.com/rust-lang/rust/pull/26783
8889[nlp]: https://github.com/rust-lang/rust/pull/27176
8890[nold2]: https://github.com/rust-lang/rust/pull/27045
8891[nold]: https://github.com/rust-lang/rfcs/blob/master/text/1156-adjust-default-object-bounds.md
8892[nom]: http://doc.rust-lang.org/nightly/nomicon/
8893[pc]: http://doc.rust-lang.org/nightly/std/process/struct.Child.html
8894[pi]: https://github.com/rust-lang/rust/pull/26699
8895[ps]: https://github.com/rust-lang/rust/pull/26884
8896[rte]: https://github.com/rust-lang/rust/pull/26950
8897[sc]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.contains
8898[search]: https://github.com/rust-lang/rust/pull/26327
8899[sew]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.ends_with
8900[sf]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.find
8901[sh]: https://github.com/rust-lang/rust/pull/27280
8902[srf]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rfind
8903[ss]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split
8904[ssw]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.starts_with
8905[st]: https://github.com/rust-lang/rust/pull/26630
8906[win1]: https://github.com/rust-lang/rust/pull/26569
8907[win2]: https://github.com/rust-lang/rust/pull/26741
8908[win3]: https://github.com/rust-lang/rust/pull/26741
8909[win4]: https://github.com/rust-lang/rust/pull/27210
8910[xp]: https://github.com/rust-lang/rust/pull/26569
8911
e9174d1e
SL
8912Version 1.2.0 (2015-08-07)
8913==========================
62682a34
SL
8914
8915* ~1200 changes, numerous bugfixes
8916
8917Highlights
8918----------
8919
8920* [Dynamically-sized-type coercions][dst] allow smart pointer types
8921 like `Rc` to contain types without a fixed size, arrays and trait
8922 objects, finally enabling use of `Rc<[T]>` and completing the
8923 implementation of DST.
8924* [Parallel codegen][parcodegen] is now working again, which can
8925 substantially speed up large builds in debug mode; It also gets
8926 another ~33% speedup when bootstrapping on a 4 core machine (using 8
8927 jobs). It's not enabled by default, but will be "in the near
8928 future". It can be activated with the `-C codegen-units=N` flag to
8929 `rustc`.
8930* This is the first release with [experimental support for linking
8931 with the MSVC linker and lib C on Windows (instead of using the GNU
8932 variants via MinGW)][win]. It is yet recommended only for the most
ff7c6d11 8933 intrepid Rustaceans.
62682a34
SL
8934* Benchmark compilations are showing a 30% improvement in
8935 bootstrapping over 1.1.
8936
8937Breaking Changes
8938----------------
8939
8940* The [`to_uppercase`] and [`to_lowercase`] methods on `char` now do
8941 unicode case mapping, which is a previously-planned change in
8942 behavior and considered a bugfix.
8943* [`mem::align_of`] now specifies [the *minimum alignment* for
8944 T][align], which is usually the alignment programs are interested
8945 in, and the same value reported by clang's
8946 `alignof`. [`mem::min_align_of`] is deprecated. This is not known to
8947 break real code.
8948* [The `#[packed]` attribute is no longer silently accepted by the
8949 compiler][packed]. This attribute did nothing and code that
8950 mentioned it likely did not work as intended.
8951* Associated type defaults are [now behind the
8952 `associated_type_defaults` feature gate][ad]. In 1.1 associated type
8953 defaults *did not work*, but could be mentioned syntactically. As
8954 such this breakage has minimal impact.
8955
8956Language
8957--------
8958
8959* Patterns with `ref mut` now correctly invoke [`DerefMut`] when
8faf50e0 8960 matching against dereferenceable values.
62682a34
SL
8961
8962Libraries
8963---------
8964
8965* The [`Extend`] trait, which grows a collection from an iterator, is
8966 implemented over iterators of references, for `String`, `Vec`,
8967 `LinkedList`, `VecDeque`, `EnumSet`, `BinaryHeap`, `VecMap`,
8968 `BTreeSet` and `BTreeMap`. [RFC][extend-rfc].
8969* The [`iter::once`] function returns an iterator that yields a single
8970 element, and [`iter::empty`] returns an iterator that yields no
8971 elements.
8972* The [`matches`] and [`rmatches`] methods on `str` return iterators
8973 over substring matches.
8974* [`Cell`] and [`RefCell`] both implement `Eq`.
8975* A number of methods for wrapping arithmetic are added to the
8976 integral types, [`wrapping_div`], [`wrapping_rem`],
8977 [`wrapping_neg`], [`wrapping_shl`], [`wrapping_shr`]. These are in
8978 addition to the existing [`wrapping_add`], [`wrapping_sub`], and
8979 [`wrapping_mul`] methods, and alternatives to the [`Wrapping`]
8980 type.. It is illegal for the default arithmetic operations in Rust
8981 to overflow; the desire to wrap must be explicit.
8982* The `{:#?}` formatting specifier [displays the alternate,
8983 pretty-printed][debugfmt] form of the `Debug` formatter. This
8984 feature was actually introduced prior to 1.0 with little
8985 fanfare.
8986* [`fmt::Formatter`] implements [`fmt::Write`], a `fmt`-specific trait
8987 for writing data to formatted strings, similar to [`io::Write`].
8988* [`fmt::Formatter`] adds 'debug builder' methods, [`debug_struct`],
8989 [`debug_tuple`], [`debug_list`], [`debug_set`], [`debug_map`]. These
8990 are used by code generators to emit implementations of [`Debug`].
8991* `str` has new [`to_uppercase`][strup] and [`to_lowercase`][strlow]
8992 methods that convert case, following Unicode case mapping.
8993* It is now easier to handle poisoned locks. The [`PoisonError`]
8994 type, returned by failing lock operations, exposes `into_inner`,
8995 `get_ref`, and `get_mut`, which all give access to the inner lock
8996 guard, and allow the poisoned lock to continue to operate. The
8997 `is_poisoned` method of [`RwLock`] and [`Mutex`] can poll for a
8998 poisoned lock without attempting to take the lock.
8999* On Unix the [`FromRawFd`] trait is implemented for [`Stdio`], and
9000 [`AsRawFd`] for [`ChildStdin`], [`ChildStdout`], [`ChildStderr`].
9001 On Windows the `FromRawHandle` trait is implemented for `Stdio`,
9002 and `AsRawHandle` for `ChildStdin`, `ChildStdout`,
9003 `ChildStderr`.
9004* [`io::ErrorKind`] has a new variant, `InvalidData`, which indicates
9005 malformed input.
9006
9007Misc
9008----
9009
9010* `rustc` employs smarter heuristics for guessing at [typos].
9011* `rustc` emits more efficient code for [no-op conversions between
9012 unsafe pointers][nop].
9013* Fat pointers are now [passed in pairs of immediate arguments][fat],
9014 resulting in faster compile times and smaller code.
9015
e9174d1e 9016[`Extend`]: https://doc.rust-lang.org/nightly/std/iter/trait.Extend.html
62682a34 9017[extend-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
e9174d1e
SL
9018[`iter::once`]: https://doc.rust-lang.org/nightly/std/iter/fn.once.html
9019[`iter::empty`]: https://doc.rust-lang.org/nightly/std/iter/fn.empty.html
9020[`matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.matches
9021[`rmatches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatches
9022[`Cell`]: https://doc.rust-lang.org/nightly/std/cell/struct.Cell.html
9023[`RefCell`]: https://doc.rust-lang.org/nightly/std/cell/struct.RefCell.html
9024[`wrapping_add`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_add
9025[`wrapping_sub`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_sub
9026[`wrapping_mul`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_mul
9027[`wrapping_div`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_div
9028[`wrapping_rem`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_rem
9029[`wrapping_neg`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_neg
9030[`wrapping_shl`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shl
9031[`wrapping_shr`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shr
9032[`Wrapping`]: https://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
9033[`fmt::Formatter`]: https://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html
9034[`fmt::Write`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Write.html
9035[`io::Write`]: https://doc.rust-lang.org/nightly/std/io/trait.Write.html
9036[`debug_struct`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_struct
9037[`debug_tuple`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_tuple
9038[`debug_list`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_list
9039[`debug_set`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_set
9040[`debug_map`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_map
9041[`Debug`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
9042[strup]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_uppercase
9043[strlow]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_lowercase
9044[`to_uppercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_uppercase
9045[`to_lowercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase
9046[`PoisonError`]: https://doc.rust-lang.org/nightly/std/sync/struct.PoisonError.html
9047[`RwLock`]: https://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html
9048[`Mutex`]: https://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html
9049[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
9050[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
9051[`Stdio`]: https://doc.rust-lang.org/nightly/std/process/struct.Stdio.html
9052[`ChildStdin`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdin.html
9053[`ChildStdout`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdout.html
9054[`ChildStderr`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStderr.html
9055[`io::ErrorKind`]: https://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html
62682a34 9056[debugfmt]: https://www.reddit.com/r/rust/comments/3ceaui/psa_produces_prettyprinted_debug_output/
e9174d1e
SL
9057[`DerefMut`]: https://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
9058[`mem::align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.align_of.html
62682a34 9059[align]: https://github.com/rust-lang/rust/pull/25646
e9174d1e 9060[`mem::min_align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.min_align_of.html
62682a34
SL
9061[typos]: https://github.com/rust-lang/rust/pull/26087
9062[nop]: https://github.com/rust-lang/rust/pull/26336
9063[fat]: https://github.com/rust-lang/rust/pull/26411
9064[dst]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
9065[parcodegen]: https://github.com/rust-lang/rust/pull/26018
9066[packed]: https://github.com/rust-lang/rust/pull/25541
9067[ad]: https://github.com/rust-lang/rust/pull/27382
9068[win]: https://github.com/rust-lang/rust/pull/25350
9069
e9174d1e 9070Version 1.1.0 (2015-06-25)
d9579d0f
AL
9071=========================
9072
9073* ~850 changes, numerous bugfixes
9074
9075Highlights
9076----------
9077
c1a9b12d 9078* The [`std::fs` module has been expanded][fs] to expand the set of
d9579d0f
AL
9079 functionality exposed:
9080 * `DirEntry` now supports optimizations like `file_type` and `metadata` which
9081 don't incur a syscall on some platforms.
9082 * A `symlink_metadata` function has been added.
9083 * The `fs::Metadata` structure now lowers to its OS counterpart, providing
9084 access to all underlying information.
c1a9b12d
SL
9085* The compiler now contains extended explanations of many errors. When an error
9086 with an explanation occurs the compiler suggests using the `--explain` flag
9087 to read the explanation. Error explanations are also [available online][err-index].
d9579d0f
AL
9088* Thanks to multiple [improvements][sk] to [type checking][pre], as
9089 well as other work, the time to bootstrap the compiler decreased by
9090 32%.
9091
9092Libraries
9093---------
9094
c1a9b12d 9095* The [`str::split_whitespace`] method splits a string on unicode
d9579d0f
AL
9096 whitespace boundaries.
9097* On both Windows and Unix, new extension traits provide conversion of
9098 I/O types to and from the underlying system handles. On Unix, these
c1a9b12d 9099 traits are [`FromRawFd`] and [`AsRawFd`], on Windows `FromRawHandle`
d9579d0f
AL
9100 and `AsRawHandle`. These are implemented for `File`, `TcpStream`,
9101 `TcpListener`, and `UpdSocket`. Further implementations for
9102 `std::process` will be stabilized later.
9103* On Unix, [`std::os::unix::symlink`] creates symlinks. On
9104 Windows, symlinks can be created with
9105 `std::os::windows::symlink_dir` and
9106 `std::os::windows::symlink_file`.
9107* The `mpsc::Receiver` type can now be converted into an iterator with
9108 `into_iter` on the [`IntoIterator`] trait.
9109* `Ipv4Addr` can be created from `u32` with the `From<u32>`
9110 implementation of the [`From`] trait.
9111* The `Debug` implementation for `RangeFull` [creates output that is
9112 more consistent with other implementations][rf].
9113* [`Debug` is implemented for `File`][file].
9114* The `Default` implementation for `Arc` [no longer requires `Sync +
9115 Send`][arc].
9116* [The `Iterator` methods `count`, `nth`, and `last` have been
dc3f5686 9117 overridden for slices to have *O*(1) performance instead of *O*(*n*)][si].
d9579d0f
AL
9118* Incorrect handling of paths on Windows has been improved in both the
9119 compiler and the standard library.
9120* [`AtomicPtr` gained a `Default` implementation][ap].
9121* In accordance with Rust's policy on arithmetic overflow `abs` now
9122 [panics on overflow when debug assertions are enabled][abs].
9123* The [`Cloned`] iterator, which was accidentally left unstable for
9124 1.0 [has been stabilized][c].
9125* The [`Incoming`] iterator, which iterates over incoming TCP
9126 connections, and which was accidentally unnamable in 1.0, [is now
9127 properly exported][inc].
9128* [`BinaryHeap`] no longer corrupts itself [when functions called by
9129 `sift_up` or `sift_down` panic][bh].
9130* The [`split_off`] method of `LinkedList` [no longer corrupts
9131 the list in certain scenarios][ll].
9132
9133Misc
9134----
9135
9136* Type checking performance [has improved notably][sk] with
9137 [multiple improvements][pre].
9138* The compiler [suggests code changes][ch] for more errors.
9139* rustc and it's build system have experimental support for [building
9140 toolchains against MUSL][m] instead of glibc on Linux.
9141* The compiler defines the `target_env` cfg value, which is used for
9142 distinguishing toolchains that are otherwise for the same
9143 platform. Presently this is set to `gnu` for common GNU Linux
9144 targets and for MinGW targets, and `musl` for MUSL Linux targets.
9145* The [`cargo rustc`][crc] command invokes a build with custom flags
9146 to rustc.
9147* [Android executables are always position independent][pie].
9148* [The `drop_with_repr_extern` lint warns about mixing `repr(C)`
9149 with `Drop`][drop].
9150
e9174d1e
SL
9151[`str::split_whitespace`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
9152[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
9153[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
9154[`std::os::unix::symlink`]: https://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
9155[`IntoIterator`]: https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
9156[`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html
d9579d0f 9157[rf]: https://github.com/rust-lang/rust/pull/24491
e9174d1e 9158[err-index]: https://doc.rust-lang.org/error-index.html
d9579d0f
AL
9159[sk]: https://github.com/rust-lang/rust/pull/24615
9160[pre]: https://github.com/rust-lang/rust/pull/25323
9161[file]: https://github.com/rust-lang/rust/pull/24598
9162[ch]: https://github.com/rust-lang/rust/pull/24683
9163[arc]: https://github.com/rust-lang/rust/pull/24695
9164[si]: https://github.com/rust-lang/rust/pull/24701
9165[ap]: https://github.com/rust-lang/rust/pull/24834
9166[m]: https://github.com/rust-lang/rust/pull/24777
9167[fs]: https://github.com/rust-lang/rfcs/blob/master/text/1044-io-fs-2.1.md
9168[crc]: https://github.com/rust-lang/cargo/pull/1568
9169[pie]: https://github.com/rust-lang/rust/pull/24953
9170[abs]: https://github.com/rust-lang/rust/pull/25441
9171[c]: https://github.com/rust-lang/rust/pull/25496
e9174d1e
SL
9172[`Cloned`]: https://doc.rust-lang.org/nightly/std/iter/struct.Cloned.html
9173[`Incoming`]: https://doc.rust-lang.org/nightly/std/net/struct.Incoming.html
d9579d0f
AL
9174[inc]: https://github.com/rust-lang/rust/pull/25522
9175[bh]: https://github.com/rust-lang/rust/pull/25856
e9174d1e 9176[`BinaryHeap`]: https://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html
d9579d0f 9177[ll]: https://github.com/rust-lang/rust/pull/26022
e9174d1e 9178[`split_off`]: https://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
d9579d0f
AL
9179[drop]: https://github.com/rust-lang/rust/pull/24935
9180
e9174d1e 9181Version 1.0.0 (2015-05-15)
bd371182 9182========================
c34b1796 9183
bd371182 9184* ~1500 changes, numerous bugfixes
c34b1796 9185
bd371182
AL
9186Highlights
9187----------
9188
9189* The vast majority of the standard library is now `#[stable]`. It is
9190 no longer possible to use unstable features with a stable build of
9191 the compiler.
9192* Many popular crates on [crates.io] now work on the stable release
9193 channel.
9194* Arithmetic on basic integer types now [checks for overflow in debug
9195 builds][overflow].
9196
9197Language
9198--------
9199
9200* Several [restrictions have been added to trait coherence][coh] in
9201 order to make it easier for upstream authors to change traits
62682a34 9202 without breaking downstream code.
bd371182
AL
9203* Digits of binary and octal literals are [lexed more eagerly][lex] to
9204 improve error messages and macro behavior. For example, `0b1234` is
9205 now lexed as `0b1234` instead of two tokens, `0b1` and `234`.
62682a34 9206* Trait bounds [are always invariant][inv], eliminating the need for
bd371182
AL
9207 the `PhantomFn` and `MarkerTrait` lang items, which have been
9208 removed.
9209* ["-" is no longer a valid character in crate names][cr], the `extern crate
9210 "foo" as bar` syntax has been replaced with `extern crate foo as
9211 bar`, and Cargo now automatically translates "-" in *package* names
9212 to underscore for the crate name.
9213* [Lifetime shadowing is an error][lt].
9214* [`Send` no longer implies `'static`][send-rfc].
9215* [UFCS now supports trait-less associated paths][moar-ufcs] like
9216 `MyType::default()`.
9217* Primitive types [now have inherent methods][prim-inherent],
9218 obviating the need for extension traits like `SliceExt`.
9219* Methods with `Self: Sized` in their `where` clause are [considered
9220 object-safe][self-sized], allowing many extension traits like
9221 `IteratorExt` to be merged into the traits they extended.
9222* You can now [refer to associated types][assoc-where] whose
9223 corresponding trait bounds appear only in a `where` clause.
9224* The final bits of [OIBIT landed][oibit-final], meaning that traits
9225 like `Send` and `Sync` are now library-defined.
9226* A [Reflect trait][reflect] was introduced, which means that
9227 downcasting via the `Any` trait is effectively limited to concrete
9228 types. This helps retain the potentially-important "parametricity"
9229 property: generic code cannot behave differently for different type
9230 arguments except in minor ways.
9231* The `unsafe_destructor` feature is now deprecated in favor of the
9232 [new `dropck`][dropck]. This change is a major reduction in unsafe
9233 code.
c34b1796 9234
bd371182
AL
9235Libraries
9236---------
c34b1796 9237
bd371182
AL
9238* The `thread_local` module [has been renamed to `std::thread`][th].
9239* The methods of `IteratorExt` [have been moved to the `Iterator`
9240 trait itself][ie].
9241* Several traits that implement Rust's conventions for type
9242 conversions, `AsMut`, `AsRef`, `From`, and `Into` have been
9243 [centralized in the `std::convert` module][con].
9244* The `FromError` trait [was removed in favor of `From`][fe].
9245* The basic sleep function [has moved to
9246 `std::thread::sleep_ms`][slp].
9247* The `splitn` function now takes an `n` parameter that represents the
9248 number of items yielded by the returned iterator [instead of the
9249 number of 'splits'][spl].
9250* [On Unix, all file descriptors are `CLOEXEC` by default][clo].
9251* [Derived implementations of `PartialOrd` now order enums according
9252 to their explicitly-assigned discriminants][po].
9253* [Methods for searching strings are generic over `Pattern`s][pat],
9254 implemented presently by `&char`, `&str`, `FnMut(char) -> bool` and
9255 some others.
9256* [In method resolution, object methods are resolved before inherent
9257 methods][meth].
9258* [`String::from_str` has been deprecated in favor of the `From` impl,
9259 `String::from`][sf].
9260* [`io::Error` implements `Sync`][ios].
9261* [The `words` method on `&str` has been replaced with
9262 `split_whitespace`][sw], to avoid answering the tricky question, 'what is
9263 a word?'
9264* The new path and IO modules are complete and `#[stable]`. This
9265 was the major library focus for this cycle.
9266* The path API was [revised][path-normalize] to normalize `.`,
9267 adjusting the tradeoffs in favor of the most common usage.
9268* A large number of remaining APIs in `std` were also stabilized
9269 during this cycle; about 75% of the non-deprecated API surface
9270 is now stable.
9271* The new [string pattern API][string-pattern] landed, which makes
9272 the string slice API much more internally consistent and flexible.
9273* A new set of [generic conversion traits][conversion] replaced
9274 many existing ad hoc traits.
9275* Generic numeric traits were [completely removed][num-traits]. This
9276 was made possible thanks to inherent methods for primitive types,
9277 and the removal gives maximal flexibility for designing a numeric
9278 hierarchy in the future.
9279* The `Fn` traits are now related via [inheritance][fn-inherit]
9280 and provide ergonomic [blanket implementations][fn-blanket].
9281* The `Index` and `IndexMut` traits were changed to
9282 [take the index by value][index-value], enabling code like
9283 `hash_map["string"]` to work.
9284* `Copy` now [inherits][copy-clone] from `Clone`, meaning that all
9285 `Copy` data is known to be `Clone` as well.
9286
9287Misc
9288----
9289
9290* Many errors now have extended explanations that can be accessed with
9291 the `--explain` flag to `rustc`.
9292* Many new examples have been added to the standard library
9293 documentation.
9294* rustdoc has received a number of improvements focused on completion
9295 and polish.
9296* Metadata was tuned, shrinking binaries [by 27%][metadata-shrink].
9297* Much headway was made on ecosystem-wide CI, making it possible
9298 to [compare builds for breakage][ci-compare].
9299
9300
9301[crates.io]: http://crates.io
9302[clo]: https://github.com/rust-lang/rust/pull/24034
9303[coh]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md
9304[con]: https://github.com/rust-lang/rust/pull/23875
9305[cr]: https://github.com/rust-lang/rust/pull/23419
9306[fe]: https://github.com/rust-lang/rust/pull/23879
9307[ie]: https://github.com/rust-lang/rust/pull/23300
9308[inv]: https://github.com/rust-lang/rust/pull/23938
9309[ios]: https://github.com/rust-lang/rust/pull/24133
9310[lex]: https://github.com/rust-lang/rfcs/blob/master/text/0879-small-base-lexing.md
9311[lt]: https://github.com/rust-lang/rust/pull/24057
9312[meth]: https://github.com/rust-lang/rust/pull/24056
9313[pat]: https://github.com/rust-lang/rfcs/blob/master/text/0528-string-patterns.md
9314[po]: https://github.com/rust-lang/rust/pull/24270
9315[sf]: https://github.com/rust-lang/rust/pull/24517
9316[slp]: https://github.com/rust-lang/rust/pull/23949
9317[spl]: https://github.com/rust-lang/rfcs/blob/master/text/0979-align-splitn-with-other-languages.md
9318[sw]: https://github.com/rust-lang/rfcs/blob/master/text/1054-str-words.md
9319[th]: https://github.com/rust-lang/rfcs/blob/master/text/0909-move-thread-local-to-std-thread.md
c34b1796 9320[send-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0458-send-improvements.md
c34b1796
AL
9321[moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
9322[prim-inherent]: https://github.com/rust-lang/rust/pull/23104
9323[overflow]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
9324[metadata-shrink]: https://github.com/rust-lang/rust/pull/22971
9325[self-sized]: https://github.com/rust-lang/rust/pull/22301
9326[assoc-where]: https://github.com/rust-lang/rust/pull/22512
9327[string-pattern]: https://github.com/rust-lang/rust/pull/22466
9328[oibit-final]: https://github.com/rust-lang/rust/pull/21689
9329[reflect]: https://github.com/rust-lang/rust/pull/23712
c34b1796
AL
9330[conversion]: https://github.com/rust-lang/rfcs/pull/529
9331[num-traits]: https://github.com/rust-lang/rust/pull/23549
9332[index-value]: https://github.com/rust-lang/rust/pull/23601
9333[dropck]: https://github.com/rust-lang/rfcs/pull/769
c34b1796
AL
9334[ci-compare]: https://gist.github.com/brson/a30a77836fbec057cbee
9335[fn-inherit]: https://github.com/rust-lang/rust/pull/23282
9336[fn-blanket]: https://github.com/rust-lang/rust/pull/23895
9337[copy-clone]: https://github.com/rust-lang/rust/pull/23860
9338[path-normalize]: https://github.com/rust-lang/rust/pull/23229
9339
bd371182 9340
b039eaaf 9341Version 1.0.0-alpha.2 (2015-02-20)
62682a34 9342=====================================
85aaf69f
SL
9343
9344* ~1300 changes, numerous bugfixes
9345
9346* Highlights
9347
9348 * The various I/O modules were [overhauled][io-rfc] to reduce
62682a34 9349 unnecessary abstractions and provide better interoperation with
85aaf69f
SL
9350 the underlying platform. The old `io` module remains temporarily
9351 at `std::old_io`.
62682a34 9352 * The standard library now [participates in feature gating][feat],
85aaf69f
SL
9353 so use of unstable libraries now requires a `#![feature(...)]`
9354 attribute. The impact of this change is [described on the
9355 forum][feat-forum]. [RFC][feat-rfc].
9356
9357* Language
9358
9359 * `for` loops [now operate on the `IntoIterator` trait][into],
9360 which eliminates the need to call `.iter()`, etc. to iterate
9361 over collections. There are some new subtleties to remember
9362 though regarding what sort of iterators various types yield, in
9363 particular that `for foo in bar { }` yields values from a move
9364 iterator, destroying the original collection. [RFC][into-rfc].
9365 * Objects now have [default lifetime bounds][obj], so you don't
9366 have to write `Box<Trait+'static>` when you don't care about
9367 storing references. [RFC][obj-rfc].
9368 * In types that implement `Drop`, [lifetimes must outlive the
9369 value][drop]. This will soon make it possible to safely
9370 implement `Drop` for types where `#[unsafe_destructor]` is now
9371 required. Read the [gorgeous RFC][drop-rfc] for details.
9372 * The fully qualified <T as Trait>::X syntax lets you set the Self
9373 type for a trait method or associated type. [RFC][ufcs-rfc].
9374 * References to types that implement `Deref<U>` now [automatically
9375 coerce to references][deref] to the dereferenced type `U`,
9376 e.g. `&T where T: Deref<U>` automatically coerces to `&U`. This
9377 should eliminate many unsightly uses of `&*`, as when converting
9378 from references to vectors into references to
9379 slices. [RFC][deref-rfc].
9380 * The explicit [closure kind syntax][close] (`|&:|`, `|&mut:|`,
9381 `|:|`) is obsolete and closure kind is inferred from context.
9382 * [`Self` is a keyword][Self].
9383
9384* Libraries
9385
9386 * The `Show` and `String` formatting traits [have been
9387 renamed][fmt] to `Debug` and `Display` to more clearly reflect
9388 their related purposes. Automatically getting a string
9389 conversion to use with `format!("{:?}", something_to_debug)` is
9390 now written `#[derive(Debug)]`.
9391 * Abstract [OS-specific string types][osstr], `std::ff::{OsString,
9392 OsStr}`, provide strings in platform-specific encodings for easier
9393 interop with system APIs. [RFC][osstr-rfc].
c34b1796 9394 * The `boxed::into_raw` and `Box::from_raw` functions [convert
85aaf69f
SL
9395 between `Box<T>` and `*mut T`][boxraw], a common pattern for
9396 creating raw pointers.
9397
9398* Tooling
9399
9400 * Certain long error messages of the form 'expected foo found bar'
9401 are now [split neatly across multiple
9402 lines][multiline]. Examples in the PR.
9403 * On Unix Rust can be [uninstalled][un] by running
9404 `/usr/local/lib/rustlib/uninstall.sh`.
9405 * The `#[rustc_on_unimplemented]` attribute, requiring the
9406 'on_unimplemented' feature, lets rustc [display custom error
9407 messages when a trait is expected to be implemented for a type
9408 but is not][onun].
9409
9410* Misc
9411
9412 * Rust is tested against a [LALR grammar][lalr], which parses
9413 almost all the Rust files that rustc does.
9414
9415[boxraw]: https://github.com/rust-lang/rust/pull/21318
9416[close]: https://github.com/rust-lang/rust/pull/21843
9417[deref]: https://github.com/rust-lang/rust/pull/21351
9418[deref-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0241-deref-conversions.md
9419[drop]: https://github.com/rust-lang/rust/pull/21972
9420[drop-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
9421[feat]: https://github.com/rust-lang/rust/pull/21248
e9174d1e 9422[feat-forum]: https://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
85aaf69f
SL
9423[feat-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
9424[fmt]: https://github.com/rust-lang/rust/pull/21457
9425[into]: https://github.com/rust-lang/rust/pull/20790
9426[into-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md#intoiterator-and-iterable
9427[io-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
9428[lalr]: https://github.com/rust-lang/rust/pull/21452
9429[multiline]: https://github.com/rust-lang/rust/pull/19870
9430[obj]: https://github.com/rust-lang/rust/pull/22230
9431[obj-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0599-default-object-bound.md
9432[onun]: https://github.com/rust-lang/rust/pull/20889
9433[osstr]: https://github.com/rust-lang/rust/pull/21488
9434[osstr-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
9435[Self]: https://github.com/rust-lang/rust/pull/22158
85aaf69f
SL
9436[ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
9437[un]: https://github.com/rust-lang/rust/pull/22256
9438
62682a34 9439
b039eaaf 9440Version 1.0.0-alpha (2015-01-09)
62682a34 9441==================================
1a4d82fc
JJ
9442
9443 * ~2400 changes, numerous bugfixes
9444
9445 * Highlights
9446
9447 * The language itself is considered feature complete for 1.0,
9448 though there will be many usability improvements and bugfixes
9449 before the final release.
9450 * Nearly 50% of the public API surface of the standard library has
9451 been declared 'stable'. Those interfaces are unlikely to change
9452 before 1.0.
9453 * The long-running debate over integer types has been
9454 [settled][ints]: Rust will ship with types named `isize` and
9455 `usize`, rather than `int` and `uint`, for pointer-sized
9456 integers. Guidelines will be rolled out during the alpha cycle.
9457 * Most crates that are not `std` have been moved out of the Rust
9458 distribution into the Cargo ecosystem so they can evolve
9459 separately and don't need to be stabilized as quickly, including
9460 'time', 'getopts', 'num', 'regex', and 'term'.
9461 * Documentation continues to be expanded with more API coverage, more
9462 examples, and more in-depth explanations. The guides have been
9463 consolidated into [The Rust Programming Language][trpl].
85aaf69f 9464 * "[Rust By Example][rbe]" is now maintained by the Rust team.
1a4d82fc
JJ
9465 * All official Rust binary installers now come with [Cargo], the
9466 Rust package manager.
9467
9468* Language
9469
9470 * Closures have been [completely redesigned][unboxed] to be
9471 implemented in terms of traits, can now be used as generic type
9472 bounds and thus monomorphized and inlined, or via an opaque
9473 pointer (boxed) as in the old system. The new system is often
9474 referred to as 'unboxed' closures.
9475 * Traits now support [associated types][assoc], allowing families
9476 of related types to be defined together and used generically in
9477 powerful ways.
9478 * Enum variants are [namespaced by their type names][enum].
9479 * [`where` clauses][where] provide a more versatile and attractive
9480 syntax for specifying generic bounds, though the previous syntax
9481 remains valid.
9482 * Rust again picks a [fallback][fb] (either i32 or f64) for uninferred
9483 numeric types.
9484 * Rust [no longer has a runtime][rt] of any description, and only
9485 supports OS threads, not green threads.
9486 * At long last, Rust has been overhauled for 'dynamically-sized
9487 types' ([DST]), which integrates 'fat pointers' (object types,
9488 arrays, and `str`) more deeply into the type system, making it
9489 more consistent.
9490 * Rust now has a general [range syntax][range], `i..j`, `i..`, and
9491 `..j` that produce range types and which, when combined with the
9492 `Index` operator and multidispatch, leads to a convenient slice
9493 notation, `[i..j]`.
9494 * The new range syntax revealed an ambiguity in the fixed-length
9495 array syntax, so now fixed length arrays [are written `[T;
9496 N]`][arrays].
9497 * The `Copy` trait is no longer implemented automatically. Unsafe
9498 pointers no longer implement `Sync` and `Send` so types
9499 containing them don't automatically either. `Sync` and `Send`
9500 are now 'unsafe traits' so one can "forcibly" implement them via
9501 `unsafe impl` if a type confirms to the requirements for them
9502 even though the internals do not (e.g. structs containing unsafe
9503 pointers like `Arc`). These changes are intended to prevent some
9504 footguns and are collectively known as [opt-in built-in
9505 traits][oibit] (though `Sync` and `Send` will soon become pure
9506 library types unknown to the compiler).
9507 * Operator traits now take their operands [by value][ops], and
9508 comparison traits can use multidispatch to compare one type
9509 against multiple other types, allowing e.g. `String` to be
9510 compared with `&str`.
9511 * `if let` and `while let` are no longer feature-gated.
9512 * Rust has adopted a more [uniform syntax for escaping unicode
9513 characters][unicode].
9514 * `macro_rules!` [has been declared stable][mac]. Though it is a
9515 flawed system it is sufficiently popular that it must be usable
9516 for 1.0. Effort has gone into [future-proofing][mac-future] it
9517 in ways that will allow other macro systems to be developed in
9518 parallel, and won't otherwise impact the evolution of the
9519 language.
9520 * The prelude has been [pared back significantly][prelude] such
9521 that it is the minimum necessary to support the most pervasive
9522 code patterns, and through [generalized where clauses][where]
9523 many of the prelude extension traits have been consolidated.
9524 * Rust's rudimentary reflection [has been removed][refl], as it
9525 incurred too much code generation for little benefit.
9526 * [Struct variants][structvars] are no longer feature-gated.
9527 * Trait bounds can be [polymorphic over lifetimes][hrtb]. Also
9528 known as 'higher-ranked trait bounds', this crucially allows
9529 unboxed closures to work.
9530 * Macros invocations surrounded by parens or square brackets and
9531 not terminated by a semicolon are [parsed as
9532 expressions][macros], which makes expressions like `vec![1i32,
9533 2, 3].len()` work as expected.
9534 * Trait objects now implement their traits automatically, and
9535 traits that can be coerced to objects now must be [object
9536 safe][objsafe].
9537 * Automatically deriving traits is now done with `#[derive(...)]`
9538 not `#[deriving(...)]` for [consistency with other naming
9539 conventions][derive].
9540 * Importing the containing module or enum at the same time as
9541 items or variants they contain is [now done with `self` instead
9542 of `mod`][self], as in use `foo::{self, bar}`
9543 * Glob imports are no longer feature-gated.
9544 * The `box` operator and `box` patterns have been feature-gated
9545 pending a redesign. For now unique boxes should be allocated
9546 like other containers, with `Box::new`.
9547
9548* Libraries
9549
9550 * A [series][coll1] of [efforts][coll2] to establish
9551 [conventions][coll3] for collections types has resulted in API
9552 improvements throughout the standard library.
9553 * New [APIs for error handling][err] provide ergonomic interop
9554 between error types, and [new conventions][err-conv] describe
9555 more clearly the recommended error handling strategies in Rust.
9556 * The `fail!` macro has been renamed to [`panic!`][panic] so that
9557 it is easier to discuss failure in the context of error handling
9558 without making clarifications as to whether you are referring to
9559 the 'fail' macro or failure more generally.
9560 * On Linux, `OsRng` prefers the new, more reliable `getrandom`
9561 syscall when available.
9562 * The 'serialize' crate has been renamed 'rustc-serialize' and
9563 moved out of the distribution to Cargo. Although it is widely
62682a34 9564 used now, it is expected to be superseded in the near future.
1a4d82fc
JJ
9565 * The `Show` formatter, typically implemented with
9566 `#[derive(Show)]` is [now requested with the `{:?}`
9567 specifier][show] and is intended for use by all types, for uses
9568 such as `println!` debugging. The new `String` formatter must be
9569 implemented by hand, uses the `{}` specifier, and is intended
9570 for full-fidelity conversions of things that can logically be
9571 represented as strings.
9572
9573* Tooling
9574
9575 * [Flexible target specification][flex] allows rustc's code
9576 generation to be configured to support otherwise-unsupported
9577 platforms.
9578 * Rust comes with rust-gdb and rust-lldb scripts that launch their
9579 respective debuggers with Rust-appropriate pretty-printing.
32a655c1 9580 * The Windows installation of Rust is distributed with the
1a4d82fc
JJ
9581 MinGW components currently required to link binaries on that
9582 platform.
9583
9584* Misc
9585
9586 * Nullable enum optimizations have been extended to more types so
9587 that e.g. `Option<Vec<T>>` and `Option<String>` take up no more
9588 space than the inner types themselves.
9589 * Work has begun on supporting AArch64.
9590
9591[Cargo]: https://crates.io
9592[unboxed]: http://smallcultfollowing.com/babysteps/blog/2014/11/26/purging-proc/
9593[enum]: https://github.com/rust-lang/rfcs/blob/master/text/0390-enum-namespacing.md
9594[flex]: https://github.com/rust-lang/rfcs/blob/master/text/0131-target-specification.md
9595[err]: https://github.com/rust-lang/rfcs/blob/master/text/0201-error-chaining.md
9596[err-conv]: https://github.com/rust-lang/rfcs/blob/master/text/0236-error-conventions.md
9597[rt]: https://github.com/rust-lang/rfcs/blob/master/text/0230-remove-runtime.md
9598[mac]: https://github.com/rust-lang/rfcs/blob/master/text/0453-macro-reform.md
9599[mac-future]: https://github.com/rust-lang/rfcs/pull/550
9600[DST]: http://smallcultfollowing.com/babysteps/blog/2014/01/05/dst-take-5/
9601[coll1]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md
9602[coll2]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md
9603[coll3]: https://github.com/rust-lang/rfcs/blob/master/text/0216-collection-views.md
9604[ops]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md
9605[prelude]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md
9606[where]: https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md
9607[refl]: https://github.com/rust-lang/rfcs/blob/master/text/0379-remove-reflection.md
9608[panic]: https://github.com/rust-lang/rfcs/blob/master/text/0221-panic.md
9609[structvars]: https://github.com/rust-lang/rfcs/blob/master/text/0418-struct-variants.md
9610[hrtb]: https://github.com/rust-lang/rfcs/blob/master/text/0387-higher-ranked-trait-bounds.md
9611[unicode]: https://github.com/rust-lang/rfcs/blob/master/text/0446-es6-unicode-escapes.md
9612[oibit]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
9613[macros]: https://github.com/rust-lang/rfcs/blob/master/text/0378-expr-macros.md
9614[range]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md#indexing-and-slicing
9615[arrays]: https://github.com/rust-lang/rfcs/blob/master/text/0520-new-array-repeat-syntax.md
9616[show]: https://github.com/rust-lang/rfcs/blob/master/text/0504-show-stabilization.md
9617[derive]: https://github.com/rust-lang/rfcs/blob/master/text/0534-deriving2derive.md
9618[self]: https://github.com/rust-lang/rfcs/blob/master/text/0532-self-in-use.md
9619[fb]: https://github.com/rust-lang/rfcs/blob/master/text/0212-restore-int-fallback.md
9620[objsafe]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
9621[assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
9622[ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871
e9174d1e 9623[trpl]: https://doc.rust-lang.org/book/index.html
85aaf69f 9624[rbe]: http://rustbyexample.com/
1a4d82fc 9625
62682a34 9626
b039eaaf 9627Version 0.12.0 (2014-10-09)
62682a34 9628=============================
1a4d82fc
JJ
9629
9630 * ~1900 changes, numerous bugfixes
9631
9632 * Highlights
9633
9634 * The introductory documentation (now called The Rust Guide) has
9635 been completely rewritten, as have a number of supplementary
9636 guides.
9637 * Rust's package manager, Cargo, continues to improve and is
9638 sometimes considered to be quite awesome.
9639 * Many API's in `std` have been reviewed and updated for
9640 consistency with the in-development Rust coding
9641 guidelines. The standard library documentation tracks
9642 stabilization progress.
9643 * Minor libraries have been moved out-of-tree to the rust-lang org
9644 on GitHub: uuid, semver, glob, num, hexfloat, fourcc. They can
9645 be installed with Cargo.
9646 * Lifetime elision allows lifetime annotations to be left off of
9647 function declarations in many common scenarios.
9648 * Rust now works on 64-bit Windows.
9649
9650 * Language
9651 * Indexing can be overloaded with the `Index` and `IndexMut`
9652 traits.
9653 * The `if let` construct takes a branch only if the `let` pattern
9654 matches, currently behind the 'if_let' feature gate.
9655 * 'where clauses', a more flexible syntax for specifying trait
9656 bounds that is more aesthetic, have been added for traits and
9657 free functions. Where clauses will in the future make it
9658 possible to constrain associated types, which would be
9659 impossible with the existing syntax.
9660 * A new slicing syntax (e.g. `[0..4]`) has been introduced behind
9661 the 'slicing_syntax' feature gate, and can be overloaded with
9662 the `Slice` or `SliceMut` traits.
9663 * The syntax for matching of sub-slices has been changed to use a
9664 postfix `..` instead of prefix (.e.g. `[a, b, c..]`), for
9665 consistency with other uses of `..` and to future-proof
9666 potential additional uses of the syntax.
9667 * The syntax for matching inclusive ranges in patterns has changed
9668 from `0..3` to `0...4` to be consistent with the exclusive range
9669 syntax for slicing.
9670 * Matching of sub-slices in non-tail positions (e.g. `[a.., b,
9671 c]`) has been put behind the 'advanced_slice_patterns' feature
9672 gate and may be removed in the future.
9673 * Components of tuples and tuple structs can be extracted using
9674 the `value.0` syntax, currently behind the `tuple_indexing`
9675 feature gate.
9676 * The `#[crate_id]` attribute is no longer supported; versioning
9677 is handled by the package manager.
9678 * Renaming crate imports are now written `extern crate foo as bar`
9679 instead of `extern crate bar = foo`.
9680 * Renaming use statements are now written `use foo as bar` instead
9681 of `use bar = foo`.
9682 * `let` and `match` bindings and argument names in macros are now
9683 hygienic.
9684 * The new, more efficient, closure types ('unboxed closures') have
9685 been added under a feature gate, 'unboxed_closures'. These will
9686 soon replace the existing closure types, once higher-ranked
9687 trait lifetimes are added to the language.
9688 * `move` has been added as a keyword, for indicating closures
9689 that capture by value.
9690 * Mutation and assignment is no longer allowed in pattern guards.
9691 * Generic structs and enums can now have trait bounds.
9692 * The `Share` trait is now called `Sync` to free up the term
9693 'shared' to refer to 'shared reference' (the default reference
9694 type.
9695 * Dynamically-sized types have been mostly implemented,
9696 unifying the behavior of fat-pointer types with the rest of the
9697 type system.
9698 * As part of dynamically-sized types, the `Sized` trait has been
9699 introduced, which qualifying types implement by default, and
9700 which type parameters expect by default. To specify that a type
9701 parameter does not need to be sized, write `<Sized? T>`. Most
9702 types are `Sized`, notable exceptions being unsized arrays
9703 (`[T]`) and trait types.
9704 * Closures can return `!`, as in `|| -> !` or `proc() -> !`.
9705 * Lifetime bounds can now be applied to type parameters and object
9706 types.
9707 * The old, reference counted GC type, `Gc<T>` which was once
9708 denoted by the `@` sigil, has finally been removed. GC will be
9709 revisited in the future.
9710
9711 * Libraries
9712 * Library documentation has been improved for a number of modules.
9713 * Bit-vectors, collections::bitv has been modernized.
9714 * The url crate is deprecated in favor of
9715 http://github.com/servo/rust-url, which can be installed with
9716 Cargo.
9717 * Most I/O stream types can be cloned and subsequently closed from
9718 a different thread.
9719 * A `std::time::Duration` type has been added for use in I/O
9720 methods that rely on timers, as well as in the 'time' crate's
9721 `Timespec` arithmetic.
9722 * The runtime I/O abstraction layer that enabled the green thread
9723 scheduler to do non-thread-blocking I/O has been removed, along
9724 with the libuv-based implementation employed by the green thread
9725 scheduler. This will greatly simplify the future I/O work.
9726 * `collections::btree` has been rewritten to have a more
9727 idiomatic and efficient design.
9728
9729 * Tooling
9730 * rustdoc output now indicates the stability levels of API's.
9731 * The `--crate-name` flag can specify the name of the crate
9732 being compiled, like `#[crate_name]`.
9733 * The `-C metadata` specifies additional metadata to hash into
9734 symbol names, and `-C extra-filename` specifies additional
9735 information to put into the output filename, for use by the
9736 package manager for versioning.
9737 * debug info generation has continued to improve and should be
9738 more reliable under both gdb and lldb.
9739 * rustc has experimental support for compiling in parallel
9740 using the `-C codegen-units` flag.
9741 * rustc no longer encodes rpath information into binaries by
9742 default.
9743
9744 * Misc
9745 * Stack usage has been optimized with LLVM lifetime annotations.
9746 * Official Rust binaries on Linux are more compatible with older
9747 kernels and distributions, built on CentOS 5.10.
9748
62682a34 9749
b039eaaf 9750Version 0.11.0 (2014-07-02)
62682a34 9751==========================
1a4d82fc
JJ
9752
9753 * ~1700 changes, numerous bugfixes
9754
9755 * Language
9756 * ~[T] has been removed from the language. This type is superseded by
9757 the Vec<T> type.
9758 * ~str has been removed from the language. This type is superseded by
9759 the String type.
9760 * ~T has been removed from the language. This type is superseded by the
9761 Box<T> type.
9762 * @T has been removed from the language. This type is superseded by the
9763 standard library's std::gc::Gc<T> type.
9764 * Struct fields are now all private by default.
9765 * Vector indices and shift amounts are both required to be a `uint`
9766 instead of any integral type.
9767 * Byte character, byte string, and raw byte string literals are now all
9768 supported by prefixing the normal literal with a `b`.
9769 * Multiple ABIs are no longer allowed in an ABI string
9770 * The syntax for lifetimes on closures/procedures has been tweaked
9771 slightly: `<'a>|A, B|: 'b + K -> T`
9772 * Floating point modulus has been removed from the language; however it
9773 is still provided by a library implementation.
9774 * Private enum variants are now disallowed.
9775 * The `priv` keyword has been removed from the language.
9776 * A closure can no longer be invoked through a &-pointer.
9777 * The `use foo, bar, baz;` syntax has been removed from the language.
9778 * The transmute intrinsic no longer works on type parameters.
9779 * Statics now allow blocks/items in their definition.
9780 * Trait bounds are separated from objects with + instead of : now.
9781 * Objects can no longer be read while they are mutably borrowed.
9782 * The address of a static is now marked as insignificant unless the
9783 #[inline(never)] attribute is placed it.
9784 * The #[unsafe_destructor] attribute is now behind a feature gate.
9785 * Struct literals are no longer allowed in ambiguous positions such as
9786 if, while, match, and for..in.
9787 * Declaration of lang items and intrinsics are now feature-gated by
9788 default.
9789 * Integral literals no longer default to `int`, and floating point
9790 literals no longer default to `f64`. Literals must be suffixed with an
9791 appropriate type if inference cannot determine the type of the
9792 literal.
9793 * The Box<T> type is no longer implicitly borrowed to &mut T.
9794 * Procedures are now required to not capture borrowed references.
9795
9796 * Libraries
9797 * The standard library is now a "facade" over a number of underlying
9798 libraries. This means that development on the standard library should
ff7c6d11 9799 be speedier due to smaller crates, as well as a clearer line between
1a4d82fc
JJ
9800 all dependencies.
9801 * A new library, libcore, lives under the standard library's facade
9802 which is Rust's "0-assumption" library, suitable for embedded and
9803 kernel development for example.
9804 * A regex crate has been added to the standard distribution. This crate
9805 includes statically compiled regular expressions.
9806 * The unwrap/unwrap_err methods on Result require a Show bound for
9807 better error messages.
9808 * The return types of the std::comm primitives have been centralized
9809 around the Result type.
9810 * A number of I/O primitives have gained the ability to time out their
9811 operations.
9812 * A number of I/O primitives have gained the ability to close their
9813 reading/writing halves to cancel pending operations.
9814 * Reverse iterator methods have been removed in favor of `rev()` on
9815 their forward-iteration counterparts.
9816 * A bitflags! macro has been added to enable easy interop with C and
9817 management of bit flags.
9818 * A debug_assert! macro is now provided which is disabled when
9819 `--cfg ndebug` is passed to the compiler.
9820 * A graphviz crate has been added for creating .dot files.
9821 * The std::cast module has been migrated into std::mem.
9822 * The std::local_data api has been migrated from freestanding functions
9823 to being based on methods.
9824 * The Pod trait has been renamed to Copy.
9825 * jemalloc has been added as the default allocator for types.
9826 * The API for allocating memory has been changed to use proper alignment
9827 and sized deallocation
9828 * Connecting a TcpStream or binding a TcpListener is now based on a
9829 string address and a u16 port. This allows connecting to a hostname as
9830 opposed to an IP.
9831 * The Reader trait now contains a core method, read_at_least(), which
9832 correctly handles many repeated 0-length reads.
9833 * The process-spawning API is now centered around a builder-style
9834 Command struct.
9835 * The :? printing qualifier has been moved from the standard library to
9836 an external libdebug crate.
9837 * Eq/Ord have been renamed to PartialEq/PartialOrd. TotalEq/TotalOrd
9838 have been renamed to Eq/Ord.
9839 * The select/plural methods have been removed from format!. The escapes
9840 for { and } have also changed from \{ and \} to {{ and }},
9841 respectively.
9842 * The TaskBuilder API has been re-worked to be a true builder, and
9843 extension traits for spawning native/green tasks have been added.
9844
9845 * Tooling
9846 * All breaking changes to the language or libraries now have their
9847 commit message annotated with `[breaking-change]` to allow for easy
9848 discovery of breaking changes.
9849 * The compiler will now try to suggest how to annotate lifetimes if a
9850 lifetime-related error occurs.
9851 * Debug info continues to be improved greatly with general bug fixes and
9852 better support for situations like link time optimization (LTO).
9853 * Usage of syntax extensions when cross-compiling has been fixed.
9854 * Functionality equivalent to GCC & Clang's -ffunction-sections,
9855 -fdata-sections and --gc-sections has been enabled by default
9856 * The compiler is now stricter about where it will load module files
9857 from when a module is declared via `mod foo;`.
9858 * The #[phase(syntax)] attribute has been renamed to #[phase(plugin)].
9859 Syntax extensions are now discovered via a "plugin registrar" type
9860 which will be extended in the future to other various plugins.
9861 * Lints have been restructured to allow for dynamically loadable lints.
9862 * A number of rustdoc improvements:
9863 * The HTML output has been visually redesigned.
9864 * Markdown is now powered by hoedown instead of sundown.
9865 * Searching heuristics have been greatly improved.
9866 * The search index has been reduced in size by a great amount.
9867 * Cross-crate documentation via `pub use` has been greatly improved.
9868 * Primitive types are now hyperlinked and documented.
9869 * Documentation has been moved from static.rust-lang.org/doc to
9870 doc.rust-lang.org
9871 * A new sandbox, play.rust-lang.org, is available for running and
9872 sharing rust code examples on-line.
9873 * Unused attributes are now more robustly warned about.
9874 * The dead_code lint now warns about unused struct fields.
9875 * Cross-compiling to iOS is now supported.
9876 * Cross-compiling to mipsel is now supported.
9877 * Stability attributes are now inherited by default and no longer apply
9878 to intra-crate usage, only inter-crate usage.
9879 * Error message related to non-exhaustive match expressions have been
9880 greatly improved.
9881
62682a34 9882
b039eaaf 9883Version 0.10 (2014-04-03)
62682a34 9884=========================
1a4d82fc
JJ
9885
9886 * ~1500 changes, numerous bugfixes
9887
9888 * Language
9889 * A new RFC process is now in place for modifying the language.
9890 * Patterns with `@`-pointers have been removed from the language.
9891 * Patterns with unique vectors (`~[T]`) have been removed from the
9892 language.
9893 * Patterns with unique strings (`~str`) have been removed from the
9894 language.
9895 * `@str` has been removed from the language.
9896 * `@[T]` has been removed from the language.
9897 * `@self` has been removed from the language.
9898 * `@Trait` has been removed from the language.
9899 * Headers on `~` allocations which contain `@` boxes inside the type for
9900 reference counting have been removed.
9901 * The semantics around the lifetimes of temporary expressions have changed,
9902 see #3511 and #11585 for more information.
9903 * Cross-crate syntax extensions are now possible, but feature gated. See
9904 #11151 for more information. This includes both `macro_rules!` macros as
9905 well as syntax extensions such as `format!`.
9906 * New lint modes have been added, and older ones have been turned on to be
9907 warn-by-default.
9908 * Unnecessary parentheses
9909 * Uppercase statics
9910 * Camel Case types
9911 * Uppercase variables
9912 * Publicly visible private types
9913 * `#[deriving]` with raw pointers
9914 * Unsafe functions can no longer be coerced to closures.
9915 * Various obscure macros such as `log_syntax!` are now behind feature gates.
9916 * The `#[simd]` attribute is now behind a feature gate.
9917 * Visibility is no longer allowed on `extern crate` statements, and
9918 unnecessary visibility (`priv`) is no longer allowed on `use` statements.
9919 * Trailing commas are now allowed in argument lists and tuple patterns.
9920 * The `do` keyword has been removed, it is now a reserved keyword.
9921 * Default type parameters have been implemented, but are feature gated.
9922 * Borrowed variables through captures in closures are now considered soundly.
9923 * `extern mod` is now `extern crate`
9924 * The `Freeze` trait has been removed.
9925 * The `Share` trait has been added for types that can be shared among
9926 threads.
9927 * Labels in macros are now hygienic.
9928 * Expression/statement macro invocations can be delimited with `{}` now.
9929 * Treatment of types allowed in `static mut` locations has been tweaked.
9930 * The `*` and `.` operators are now overloadable through the `Deref` and
9931 `DerefMut` traits.
9932 * `~Trait` and `proc` no longer have `Send` bounds by default.
9933 * Partial type hints are now supported with the `_` type marker.
9934 * An `Unsafe` type was introduced for interior mutability. It is now
9935 considered undefined to transmute from `&T` to `&mut T` without using the
9936 `Unsafe` type.
9937 * The #[linkage] attribute was implemented for extern statics/functions.
9938 * The inner attribute syntax has changed from `#[foo];` to `#![foo]`.
9939 * `Pod` was renamed to `Copy`.
9940
9941 * Libraries
9942 * The `libextra` library has been removed. It has now been decomposed into
9943 component libraries with smaller and more focused nuggets of
9944 functionality. The full list of libraries can be found on the
9945 documentation index page.
9946 * std: `std::condition` has been removed. All I/O errors are now propagated
9947 through the `Result` type. In order to assist with error handling, a
9948 `try!` macro for unwrapping errors with an early return and a lint for
9949 unused results has been added. See #12039 for more information.
9950 * std: The `vec` module has been renamed to `slice`.
9951 * std: A new vector type, `Vec<T>`, has been added in preparation for DST.
9952 This will become the only growable vector in the future.
2c00a5a8 9953 * std: `std::io` now has more public re-exports. Types such as `BufferedReader`
1a4d82fc
JJ
9954 are now found at `std::io::BufferedReader` instead of
9955 `std::io::buffered::BufferedReader`.
9956 * std: `print` and `println` are no longer in the prelude, the `print!` and
9957 `println!` macros are intended to be used instead.
9958 * std: `Rc` now has a `Weak` pointer for breaking cycles, and it no longer
9959 attempts to statically prevent cycles.
9960 * std: The standard distribution is adopting the policy of pushing failure
9961 to the user rather than failing in libraries. Many functions (such as
9962 `slice::last()`) now return `Option<T>` instead of `T` + failing.
9963 * std: `fmt::Default` has been renamed to `fmt::Show`, and it now has a new
9964 deriving mode: `#[deriving(Show)]`.
9965 * std: `ToStr` is now implemented for all types implementing `Show`.
9966 * std: The formatting trait methods now take `&self` instead of `&T`
9967 * std: The `invert()` method on iterators has been renamed to `rev()`
9968 * std: `std::num` has seen a reduction in the genericity of its traits,
9969 consolidating functionality into a few core traits.
9970 * std: Backtraces are now printed on task failure if the environment
9971 variable `RUST_BACKTRACE` is present.
9972 * std: Naming conventions for iterators have been standardized. More details
9973 can be found on the wiki's style guide.
9974 * std: `eof()` has been removed from the `Reader` trait. Specific types may
9975 still implement the function.
9976 * std: Networking types are now cloneable to allow simultaneous reads/writes.
9977 * std: `assert_approx_eq!` has been removed
9978 * std: The `e` and `E` formatting specifiers for floats have been added to
9979 print them in exponential notation.
9980 * std: The `Times` trait has been removed
9981 * std: Indications of variance and opting out of builtin bounds is done
9982 through marker types in `std::kinds::marker` now
9983 * std: `hash` has been rewritten, `IterBytes` has been removed, and
9984 `#[deriving(Hash)]` is now possible.
9985 * std: `SharedChan` has been removed, `Sender` is now cloneable.
9986 * std: `Chan` and `Port` were renamed to `Sender` and `Receiver`.
9987 * std: `Chan::new` is now `channel()`.
9988 * std: A new synchronous channel type has been implemented.
9989 * std: A `select!` macro is now provided for selecting over `Receiver`s.
9990 * std: `hashmap` and `trie` have been moved to `libcollections`
9991 * std: `run` has been rolled into `io::process`
9992 * std: `assert_eq!` now uses `{}` instead of `{:?}`
9993 * std: The equality and comparison traits have seen some reorganization.
9994 * std: `rand` has moved to `librand`.
9995 * std: `to_{lower,upper}case` has been implemented for `char`.
9996 * std: Logging has been moved to `liblog`.
9997 * collections: `HashMap` has been rewritten for higher performance and less
9998 memory usage.
9999 * native: The default runtime is now `libnative`. If `libgreen` is desired,
10000 it can be booted manually. The runtime guide has more information and
10001 examples.
10002 * native: All I/O functionality except signals has been implemented.
10003 * green: Task spawning with `libgreen` has been optimized with stack caching
10004 and various trimming of code.
10005 * green: Tasks spawned by `libgreen` now have an unmapped guard page.
10006 * sync: The `extra::sync` module has been updated to modern rust (and moved
10007 to the `sync` library), tweaking and improving various interfaces while
10008 dropping redundant functionality.
10009 * sync: A new `Barrier` type has been added to the `sync` library.
10010 * sync: An efficient mutex for native and green tasks has been implemented.
10011 * serialize: The `base64` module has seen some improvement. It treats
10012 newlines better, has non-string error values, and has seen general
10013 cleanup.
10014 * fourcc: A `fourcc!` macro was introduced
10015 * hexfloat: A `hexfloat!` macro was implemented for specifying floats via a
10016 hexadecimal literal.
10017
10018 * Tooling
10019 * `rustpkg` has been deprecated and removed from the main repository. Its
10020 replacement, `cargo`, is under development.
10021 * Nightly builds of rust are now available
10022 * The memory usage of rustc has been improved many times throughout this
10023 release cycle.
10024 * The build process supports disabling rpath support for the rustc binary
10025 itself.
10026 * Code generation has improved in some cases, giving more information to the
10027 LLVM optimization passes to enable more extensive optimizations.
10028 * Debuginfo compatibility with lldb on OSX has been restored.
10029 * The master branch is now gated on an android bot, making building for
10030 android much more reliable.
10031 * Output flags have been centralized into one `--emit` flag.
10032 * Crate type flags have been centralized into one `--crate-type` flag.
10033 * Codegen flags have been consolidated behind a `-C` flag.
10034 * Linking against outdated crates now has improved error messages.
10035 * Error messages with lifetimes will often suggest how to annotate the
10036 function to fix the error.
10037 * Many more types are documented in the standard library, and new guides
10038 were written.
10039 * Many `rustdoc` improvements:
10040 * code blocks are syntax highlighted.
10041 * render standalone markdown files.
10042 * the --test flag tests all code blocks by default.
10043 * exported macros are displayed.
2c00a5a8
XL
10044 * re-exported types have their documentation inlined at the location of the
10045 first re-export.
1a4d82fc
JJ
10046 * search works across crates that have been rendered to the same output
10047 directory.
10048
62682a34 10049
b039eaaf 10050Version 0.9 (2014-01-09)
62682a34 10051==========================
1a4d82fc
JJ
10052
10053 * ~1800 changes, numerous bugfixes
10054
10055 * Language
10056 * The `float` type has been removed. Use `f32` or `f64` instead.
10057 * A new facility for enabling experimental features (feature gating) has
10058 been added, using the crate-level `#[feature(foo)]` attribute.
10059 * Managed boxes (@) are now behind a feature gate
10060 (`#[feature(managed_boxes)]`) in preparation for future removal. Use the
10061 standard library's `Gc` or `Rc` types instead.
10062 * `@mut` has been removed. Use `std::cell::{Cell, RefCell}` instead.
10063 * Jumping back to the top of a loop is now done with `continue` instead of
10064 `loop`.
10065 * Strings can no longer be mutated through index assignment.
10066 * Raw strings can be created via the basic `r"foo"` syntax or with matched
10067 hash delimiters, as in `r###"foo"###`.
10068 * `~fn` is now written `proc (args) -> retval { ... }` and may only be
10069 called once.
10070 * The `&fn` type is now written `|args| -> ret` to match the literal form.
10071 * `@fn`s have been removed.
10072 * `do` only works with procs in order to make it obvious what the cost
10073 of `do` is.
10074 * Single-element tuple-like structs can no longer be dereferenced to
10075 obtain the inner value. A more comprehensive solution for overloading
10076 the dereference operator will be provided in the future.
10077 * The `#[link(...)]` attribute has been replaced with
10078 `#[crate_id = "name#vers"]`.
10079 * Empty `impl`s must be terminated with empty braces and may not be
10080 terminated with a semicolon.
10081 * Keywords are no longer allowed as lifetime names; the `self` lifetime
10082 no longer has any special meaning.
10083 * The old `fmt!` string formatting macro has been removed.
10084 * `printf!` and `printfln!` (old-style formatting) removed in favor of
10085 `print!` and `println!`.
10086 * `mut` works in patterns now, as in `let (mut x, y) = (1, 2);`.
10087 * The `extern mod foo (name = "bar")` syntax has been removed. Use
10088 `extern mod foo = "bar"` instead.
10089 * New reserved keywords: `alignof`, `offsetof`, `sizeof`.
10090 * Macros can have attributes.
10091 * Macros can expand to items with attributes.
10092 * Macros can expand to multiple items.
10093 * The `asm!` macro is feature-gated (`#[feature(asm)]`).
10094 * Comments may be nested.
10095 * Values automatically coerce to trait objects they implement, without
10096 an explicit `as`.
10097 * Enum discriminants are no longer an entire word but as small as needed to
10098 contain all the variants. The `repr` attribute can be used to override
10099 the discriminant size, as in `#[repr(int)]` for integer-sized, and
10100 `#[repr(C)]` to match C enums.
10101 * Non-string literals are not allowed in attributes (they never worked).
10102 * The FFI now supports variadic functions.
10103 * Octal numeric literals, as in `0o7777`.
10104 * The `concat!` syntax extension performs compile-time string concatenation.
10105 * The `#[fixed_stack_segment]` and `#[rust_stack]` attributes have been
10106 removed as Rust no longer uses segmented stacks.
10107 * Non-ascii identifiers are feature-gated (`#[feature(non_ascii_idents)]`).
10108 * Ignoring all fields of an enum variant or tuple-struct is done with `..`,
10109 not `*`; ignoring remaining fields of a struct is also done with `..`,
10110 not `_`; ignoring a slice of a vector is done with `..`, not `.._`.
10111 * `rustc` supports the "win64" calling convention via `extern "win64"`.
10112 * `rustc` supports the "system" calling convention, which defaults to the
10113 preferred convention for the target platform, "stdcall" on 32-bit Windows,
10114 "C" elsewhere.
10115 * The `type_overflow` lint (default: warn) checks literals for overflow.
10116 * The `unsafe_block` lint (default: allow) checks for usage of `unsafe`.
10117 * The `attribute_usage` lint (default: warn) warns about unknown
10118 attributes.
10119 * The `unknown_features` lint (default: warn) warns about unknown
10120 feature gates.
10121 * The `dead_code` lint (default: warn) checks for dead code.
10122 * Rust libraries can be linked statically to one another
10123 * `#[link_args]` is behind the `link_args` feature gate.
10124 * Native libraries are now linked with `#[link(name = "foo")]`
10125 * Native libraries can be statically linked to a rust crate
10126 (`#[link(name = "foo", kind = "static")]`).
10127 * Native OS X frameworks are now officially supported
10128 (`#[link(name = "foo", kind = "framework")]`).
10129 * The `#[thread_local]` attribute creates thread-local (not task-local)
10130 variables. Currently behind the `thread_local` feature gate.
10131 * The `return` keyword may be used in closures.
10132 * Types that can be copied via a memcpy implement the `Pod` kind.
10133 * The `cfg` attribute can now be used on struct fields and enum variants.
10134
10135 * Libraries
10136 * std: The `option` and `result` API's have been overhauled to make them
10137 simpler, more consistent, and more composable.
10138 * std: The entire `std::io` module has been replaced with one that is
10139 more comprehensive and that properly interfaces with the underlying
10140 scheduler. File, TCP, UDP, Unix sockets, pipes, and timers are all
10141 implemented.
10142 * std: `io::util` contains a number of useful implementations of
10143 `Reader` and `Writer`, including `NullReader`, `NullWriter`,
10144 `ZeroReader`, `TeeReader`.
10145 * std: The reference counted pointer type `extra::rc` moved into std.
10146 * std: The `Gc` type in the `gc` module will replace `@` (it is currently
10147 just a wrapper around it).
10148 * std: The `Either` type has been removed.
10149 * std: `fmt::Default` can be implemented for any type to provide default
10150 formatting to the `format!` macro, as in `format!("{}", myfoo)`.
10151 * std: The `rand` API continues to be tweaked.
10152 * std: The `rust_begin_unwind` function, useful for inserting breakpoints
10153 on failure in gdb, is now named `rust_fail`.
10154 * std: The `each_key` and `each_value` methods on `HashMap` have been
10155 replaced by the `keys` and `values` iterators.
10156 * std: Functions dealing with type size and alignment have moved from the
10157 `sys` module to the `mem` module.
10158 * std: The `path` module was written and API changed.
10159 * std: `str::from_utf8` has been changed to cast instead of allocate.
10160 * std: `starts_with` and `ends_with` methods added to vectors via the
10161 `ImmutableEqVector` trait, which is in the prelude.
10162 * std: Vectors can be indexed with the `get_opt` method, which returns `None`
10163 if the index is out of bounds.
10164 * std: Task failure no longer propagates between tasks, as the model was
10165 complex, expensive, and incompatible with thread-based tasks.
10166 * std: The `Any` type can be used for dynamic typing.
10167 * std: `~Any` can be passed to the `fail!` macro and retrieved via
10168 `task::try`.
10169 * std: Methods that produce iterators generally do not have an `_iter`
10170 suffix now.
10171 * std: `cell::Cell` and `cell::RefCell` can be used to introduce mutability
10172 roots (mutable fields, etc.). Use instead of e.g. `@mut`.
10173 * std: `util::ignore` renamed to `prelude::drop`.
10174 * std: Slices have `sort` and `sort_by` methods via the `MutableVector`
10175 trait.
10176 * std: `vec::raw` has seen a lot of cleanup and API changes.
10177 * std: The standard library no longer includes any C++ code, and very
10178 minimal C, eliminating the dependency on libstdc++.
10179 * std: Runtime scheduling and I/O functionality has been factored out into
10180 extensible interfaces and is now implemented by two different crates:
10181 libnative, for native threading and I/O; and libgreen, for green threading
10182 and I/O. This paves the way for using the standard library in more limited
10183 embedded environments.
10184 * std: The `comm` module has been rewritten to be much faster, have a
10185 simpler, more consistent API, and to work for both native and green
10186 threading.
10187 * std: All libuv dependencies have been moved into the rustuv crate.
10188 * native: New implementations of runtime scheduling on top of OS threads.
10189 * native: New native implementations of TCP, UDP, file I/O, process spawning,
10190 and other I/O.
10191 * green: The green thread scheduler and message passing types are almost
10192 entirely lock-free.
10193 * extra: The `flatpipes` module had bitrotted and was removed.
10194 * extra: All crypto functions have been removed and Rust now has a policy of
10195 not reimplementing crypto in the standard library. In the future crypto
10196 will be provided by external crates with bindings to established libraries.
10197 * extra: `c_vec` has been modernized.
10198 * extra: The `sort` module has been removed. Use the `sort` method on
10199 mutable slices.
10200
10201 * Tooling
10202 * The `rust` and `rusti` commands have been removed, due to lack of
10203 maintenance.
10204 * `rustdoc` was completely rewritten.
10205 * `rustdoc` can test code examples in documentation.
10206 * `rustpkg` can test packages with the argument, 'test'.
10207 * `rustpkg` supports arbitrary dependencies, including C libraries.
10208 * `rustc`'s support for generating debug info is improved again.
10209 * `rustc` has better error reporting for unbalanced delimiters.
10210 * `rustc`'s JIT support was removed due to bitrot.
10211 * Executables and static libraries can be built with LTO (-Z lto)
10212 * `rustc` adds a `--dep-info` flag for communicating dependencies to
10213 build tools.
10214
62682a34 10215
b039eaaf 10216Version 0.8 (2013-09-26)
62682a34 10217============================
1a4d82fc
JJ
10218
10219 * ~2200 changes, numerous bugfixes
10220
10221 * Language
10222 * The `for` loop syntax has changed to work with the `Iterator` trait.
10223 * At long last, unwinding works on Windows.
10224 * Default methods are ready for use.
10225 * Many trait inheritance bugs fixed.
10226 * Owned and borrowed trait objects work more reliably.
10227 * `copy` is no longer a keyword. It has been replaced by the `Clone` trait.
10228 * rustc can omit emission of code for the `debug!` macro if it is passed
10229 `--cfg ndebug`
10230 * mod.rs is now "blessed". When loading `mod foo;`, rustc will now look
10231 for foo.rs, then foo/mod.rs, and will generate an error when both are
10232 present.
10233 * Strings no longer contain trailing nulls. The new `std::c_str` module
10234 provides new mechanisms for converting to C strings.
10235 * The type of foreign functions is now `extern "C" fn` instead of `*u8'.
10236 * The FFI has been overhauled such that foreign functions are called directly,
10237 instead of through a stack-switching wrapper.
10238 * Calling a foreign function must be done through a Rust function with the
10239 `#[fixed_stack_segment]` attribute.
10240 * The `externfn!` macro can be used to declare both a foreign function and
10241 a `#[fixed_stack_segment]` wrapper at once.
10242 * `pub` and `priv` modifiers on `extern` blocks are no longer parsed.
10243 * `unsafe` is no longer allowed on extern fns - they are all unsafe.
10244 * `priv` is disallowed everywhere except for struct fields and enum variants.
10245 * `&T` (besides `&'static T`) is no longer allowed in `@T`.
10246 * `ref` bindings in irrefutable patterns work correctly now.
10247 * `char` is now prevented from containing invalid code points.
10248 * Casting to `bool` is no longer allowed.
10249 * `\0` is now accepted as an escape in chars and strings.
10250 * `yield` is a reserved keyword.
10251 * `typeof` is a reserved keyword.
10252 * Crates may be imported by URL with `extern mod foo = "url";`.
10253 * Explicit enum discriminants may be given as uints as in `enum E { V = 0u }`
10254 * Static vectors can be initialized with repeating elements,
10255 e.g. `static foo: [u8, .. 100]: [0, .. 100];`.
10256 * Static structs can be initialized with functional record update,
10257 e.g. `static foo: Foo = Foo { a: 5, .. bar };`.
10258 * `cfg!` can be used to conditionally execute code based on the crate
10259 configuration, similarly to `#[cfg(...)]`.
10260 * The `unnecessary_qualification` lint detects unneeded module
10261 prefixes (default: allow).
10262 * Arithmetic operations have been implemented on the SIMD types in
10263 `std::unstable::simd`.
10264 * Exchange allocation headers were removed, reducing memory usage.
10265 * `format!` implements a completely new, extensible, and higher-performance
10266 string formatting system. It will replace `fmt!`.
10267 * `print!` and `println!` write formatted strings (using the `format!`
10268 extension) to stdout.
10269 * `write!` and `writeln!` write formatted strings (using the `format!`
10270 extension) to the new Writers in `std::rt::io`.
10271 * The library section in which a function or static is placed may
10272 be specified with `#[link_section = "..."]`.
10273 * The `proto!` syntax extension for defining bounded message protocols
10274 was removed.
10275 * `macro_rules!` is hygienic for `let` declarations.
10276 * The `#[export_name]` attribute specifies the name of a symbol.
10277 * `unreachable!` can be used to indicate unreachable code, and fails
10278 if executed.
10279
10280 * Libraries
10281 * std: Transitioned to the new runtime, written in Rust.
10282 * std: Added an experimental I/O library, `rt::io`, based on the new
10283 runtime.
10284 * std: A new generic `range` function was added to the prelude, replacing
10285 `uint::range` and friends.
10286 * std: `range_rev` no longer exists. Since range is an iterator it can be
10287 reversed with `range(lo, hi).invert()`.
10288 * std: The `chain` method on option renamed to `and_then`; `unwrap_or_default`
10289 renamed to `unwrap_or`.
10290 * std: The `iterator` module was renamed to `iter`.
10291 * std: Integral types now support the `checked_add`, `checked_sub`, and
10292 `checked_mul` operations for detecting overflow.
10293 * std: Many methods in `str`, `vec`, `option, `result` were renamed for
10294 consistency.
10295 * std: Methods are standardizing on conventions for casting methods:
10296 `to_foo` for copying, `into_foo` for moving, `as_foo` for temporary
10297 and cheap casts.
10298 * std: The `CString` type in `c_str` provides new ways to convert to and
10299 from C strings.
10300 * std: `DoubleEndedIterator` can yield elements in two directions.
10301 * std: The `mut_split` method on vectors partitions an `&mut [T]` into
10302 two splices.
10303 * std: `str::from_bytes` renamed to `str::from_utf8`.
10304 * std: `pop_opt` and `shift_opt` methods added to vectors.
10305 * std: The task-local data interface no longer uses @, and keys are
10306 no longer function pointers.
10307 * std: The `swap_unwrap` method of `Option` renamed to `take_unwrap`.
10308 * std: Added `SharedPort` to `comm`.
10309 * std: `Eq` has a default method for `ne`; only `eq` is required
10310 in implementations.
10311 * std: `Ord` has default methods for `le`, `gt` and `ge`; only `lt`
10312 is required in implementations.
10313 * std: `is_utf8` performance is improved, impacting many string functions.
10314 * std: `os::MemoryMap` provides cross-platform mmap.
10315 * std: `ptr::offset` is now unsafe, but also more optimized. Offsets that
10316 are not 'in-bounds' are considered undefined.
10317 * std: Many freestanding functions in `vec` removed in favor of methods.
10318 * std: Many freestanding functions on scalar types removed in favor of
10319 methods.
10320 * std: Many options to task builders were removed since they don't make
10321 sense in the new scheduler design.
10322 * std: More containers implement `FromIterator` so can be created by the
10323 `collect` method.
10324 * std: More complete atomic types in `unstable::atomics`.
10325 * std: `comm::PortSet` removed.
10326 * std: Mutating methods in the `Set` and `Map` traits have been moved into
10327 the `MutableSet` and `MutableMap` traits. `Container::is_empty`,
10328 `Map::contains_key`, `MutableMap::insert`, and `MutableMap::remove` have
10329 default implementations.
10330 * std: Various `from_str` functions were removed in favor of a generic
10331 `from_str` which is available in the prelude.
10332 * std: `util::unreachable` removed in favor of the `unreachable!` macro.
10333 * extra: `dlist`, the doubly-linked list was modernized.
10334 * extra: Added a `hex` module with `ToHex` and `FromHex` traits.
10335 * extra: Added `glob` module, replacing `std::os::glob`.
10336 * extra: `rope` was removed.
10337 * extra: `deque` was renamed to `ringbuf`. `RingBuf` implements `Deque`.
10338 * extra: `net`, and `timer` were removed. The experimental replacements
10339 are `std::rt::io::net` and `std::rt::io::timer`.
10340 * extra: Iterators implemented for `SmallIntMap`.
10341 * extra: Iterators implemented for `Bitv` and `BitvSet`.
10342 * extra: `SmallIntSet` removed. Use `BitvSet`.
10343 * extra: Performance of JSON parsing greatly improved.
10344 * extra: `semver` updated to SemVer 2.0.0.
10345 * extra: `term` handles more terminals correctly.
10346 * extra: `dbg` module removed.
10347 * extra: `par` module removed.
10348 * extra: `future` was cleaned up, with some method renames.
10349 * extra: Most free functions in `getopts` were converted to methods.
10350
10351 * Other
10352 * rustc's debug info generation (`-Z debug-info`) is greatly improved.
10353 * rustc accepts `--target-cpu` to compile to a specific CPU architecture,
10354 similarly to gcc's `--march` flag.
10355 * rustc's performance compiling small crates is much better.
10356 * rustpkg has received many improvements.
10357 * rustpkg supports git tags as package IDs.
10358 * rustpkg builds into target-specific directories so it can be used for
10359 cross-compiling.
10360 * The number of concurrent test tasks is controlled by the environment
10361 variable RUST_TEST_TASKS.
10362 * The test harness can now report metrics for benchmarks.
10363 * All tools have man pages.
10364 * Programs compiled with `--test` now support the `-h` and `--help` flags.
10365 * The runtime uses jemalloc for allocations.
10366 * Segmented stacks are temporarily disabled as part of the transition to
10367 the new runtime. Stack overflows are possible!
10368 * A new documentation backend, rustdoc_ng, is available for use. It is
10369 still invoked through the normal `rustdoc` command.
10370
62682a34 10371
b039eaaf 10372Version 0.7 (2013-07-03)
62682a34 10373=======================
1a4d82fc
JJ
10374
10375 * ~2000 changes, numerous bugfixes
10376
10377 * Language
10378 * `impl`s no longer accept a visibility qualifier. Put them on methods
10379 instead.
10380 * The borrow checker has been rewritten with flow-sensitivity, fixing
10381 many bugs and inconveniences.
10382 * The `self` parameter no longer implicitly means `&'self self`,
10383 and can be explicitly marked with a lifetime.
10384 * Overloadable compound operators (`+=`, etc.) have been temporarily
10385 removed due to bugs.
10386 * The `for` loop protocol now requires `for`-iterators to return `bool`
10387 so they compose better.
10388 * The `Durable` trait is replaced with the `'static` bounds.
10389 * Trait default methods work more often.
10390 * Structs with the `#[packed]` attribute have byte alignment and
10391 no padding between fields.
10392 * Type parameters bound by `Copy` must now be copied explicitly with
10393 the `copy` keyword.
10394 * It is now illegal to move out of a dereferenced unsafe pointer.
10395 * `Option<~T>` is now represented as a nullable pointer.
10396 * `@mut` does dynamic borrow checks correctly.
10397 * The `main` function is only detected at the topmost level of the crate.
10398 The `#[main]` attribute is still valid anywhere.
10399 * Struct fields may no longer be mutable. Use inherited mutability.
10400 * The `#[no_send]` attribute makes a type that would otherwise be
10401 `Send`, not.
10402 * The `#[no_freeze]` attribute makes a type that would otherwise be
10403 `Freeze`, not.
10404 * Unbounded recursion will abort the process after reaching the limit
10405 specified by the `RUST_MAX_STACK` environment variable (default: 1GB).
10406 * The `vecs_implicitly_copyable` lint mode has been removed. Vectors
10407 are never implicitly copyable.
10408 * `#[static_assert]` makes compile-time assertions about static bools.
10409 * At long last, 'argument modes' no longer exist.
10410 * The rarely used `use mod` statement no longer exists.
10411
10412 * Syntax extensions
10413 * `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
10414 argument list.
10415 * `Encodable`, `Decodable`, `Ord`, `TotalOrd`, `TotalEq`, `DeepClone`,
10416 `Rand`, `Zero` and `ToStr` can all be automatically derived with
10417 `#[deriving(...)]`.
10418 * The `bytes!` macro returns a vector of bytes for string, u8, char,
10419 and unsuffixed integer literals.
10420
10421 * Libraries
10422 * The `core` crate was renamed to `std`.
10423 * The `std` crate was renamed to `extra`.
10424 * More and improved documentation.
10425 * std: `iterator` module for external iterator objects.
10426 * Many old-style (internal, higher-order function) iterators replaced by
10427 implementations of `Iterator`.
10428 * std: Many old internal vector and string iterators,
10429 incl. `any`, `all`. removed.
10430 * std: The `finalize` method of `Drop` renamed to `drop`.
10431 * std: The `drop` method now takes `&mut self` instead of `&self`.
2c00a5a8 10432 * std: The prelude no longer re-exports any modules, only types and traits.
1a4d82fc
JJ
10433 * std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
10434 `Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
10435 * std: New numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
10436 `Algebraic`, `Trigonometric`, `Exponential`, `Primitive`.
10437 * std: Tuple traits and accessors defined for up to 12-tuples, e.g.
10438 `(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`.
10439 * std: Many types implement `Clone`.
10440 * std: `path` type renamed to `Path`.
10441 * std: `mut` module and `Mut` type removed.
10442 * std: Many standalone functions removed in favor of methods and iterators
10443 in `vec`, `str`. In the future methods will also work as functions.
10444 * std: `reinterpret_cast` removed. Use `transmute`.
10445 * std: ascii string handling in `std::ascii`.
10446 * std: `Rand` is implemented for ~/@.
10447 * std: `run` module for spawning processes overhauled.
10448 * std: Various atomic types added to `unstable::atomic`.
10449 * std: Various types implement `Zero`.
10450 * std: `LinearMap` and `LinearSet` renamed to `HashMap` and `HashSet`.
10451 * std: Borrowed pointer functions moved from `ptr` to `borrow`.
10452 * std: Added `os::mkdir_recursive`.
10453 * std: Added `os::glob` function performs filesystems globs.
10454 * std: `FuzzyEq` renamed to `ApproxEq`.
10455 * std: `Map` now defines `pop` and `swap` methods.
10456 * std: `Cell` constructors converted to static methods.
10457 * extra: `rc` module adds the reference counted pointers, `Rc` and `RcMut`.
10458 * extra: `flate` module moved from `std` to `extra`.
10459 * extra: `fileinput` module for iterating over a series of files.
10460 * extra: `Complex` number type and `complex` module.
10461 * extra: `Rational` number type and `rational` module.
10462 * extra: `BigInt`, `BigUint` implement numeric and comparison traits.
10463 * extra: `term` uses terminfo now, is more correct.
10464 * extra: `arc` functions converted to methods.
10465 * extra: Implementation of fixed output size variations of SHA-2.
10466
10467 * Tooling
60c5eb7d 10468 * `unused_variables` lint mode for unused variables (default: warn).
1a4d82fc
JJ
10469 * `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks
10470 (default: warn).
10471 * `unused_mut` lint mode for identifying unused `mut` qualifiers
10472 (default: warn).
10473 * `dead_assignment` lint mode for unread variables (default: warn).
10474 * `unnecessary_allocation` lint mode detects some heap allocations that are
10475 immediately borrowed so could be written without allocating (default: warn).
10476 * `missing_doc` lint mode (default: allow).
10477 * `unreachable_code` lint mode (default: warn).
10478 * The `rusti` command has been rewritten and a number of bugs addressed.
10479 * rustc outputs in color on more terminals.
10480 * rustc accepts a `--link-args` flag to pass arguments to the linker.
10481 * rustc accepts a `-Z print-link-args` flag for debugging linkage.
10482 * Compiling with `-g` will make the binary record information about
10483 dynamic borrowcheck failures for debugging.
10484 * rustdoc has a nicer stylesheet.
10485 * Various improvements to rustdoc.
10486 * Improvements to rustpkg (see the detailed release notes).
10487
62682a34 10488
b039eaaf 10489Version 0.6 (2013-04-03)
62682a34 10490========================
1a4d82fc
JJ
10491
10492 * ~2100 changes, numerous bugfixes
10493
10494 * Syntax changes
10495 * The self type parameter in traits is now spelled `Self`
10496 * The `self` parameter in trait and impl methods must now be explicitly
10497 named (for example: `fn f(&self) { }`). Implicit self is deprecated.
10498 * Static methods no longer require the `static` keyword and instead
10499 are distinguished by the lack of a `self` parameter
10500 * Replaced the `Durable` trait with the `'static` lifetime
10501 * The old closure type syntax with the trailing sigil has been
10502 removed in favor of the more consistent leading sigil
10503 * `super` is a keyword, and may be prefixed to paths
10504 * Trait bounds are separated with `+` instead of whitespace
10505 * Traits are implemented with `impl Trait for Type`
10506 instead of `impl Type: Trait`
10507 * Lifetime syntax is now `&'l foo` instead of `&l/foo`
10508 * The `export` keyword has finally been removed
10509 * The `move` keyword has been removed (see "Semantic changes")
10510 * The interior mutability qualifier on vectors, `[mut T]`, has been
10511 removed. Use `&mut [T]`, etc.
10512 * `mut` is no longer valid in `~mut T`. Use inherited mutability
10513 * `fail` is no longer a keyword. Use `fail!()`
10514 * `assert` is no longer a keyword. Use `assert!()`
10515 * `log` is no longer a keyword. use `debug!`, etc.
10516 * 1-tuples may be represented as `(T,)`
10517 * Struct fields may no longer be `mut`. Use inherited mutability,
10518 `@mut T`, `core::mut` or `core::cell`
10519 * `extern mod { ... }` is no longer valid syntax for foreign
10520 function modules. Use extern blocks: `extern { ... }`
10521 * Newtype enums removed. Use tuple-structs.
10522 * Trait implementations no longer support visibility modifiers
10523 * Pattern matching over vectors improved and expanded
10524 * `const` renamed to `static` to correspond to lifetime name,
10525 and make room for future `static mut` unsafe mutable globals.
10526 * Replaced `#[deriving_eq]` with `#[deriving(Eq)]`, etc.
10527 * `Clone` implementations can be automatically generated with
10528 `#[deriving(Clone)]`
10529 * Casts to traits must use a pointer sigil, e.g. `@foo as @Bar`
10530 instead of `foo as Bar`.
10531 * Fixed length vector types are now written as `[int, .. 3]`
10532 instead of `[int * 3]`.
10533 * Fixed length vector types can express the length as a constant
10534 expression. (ex: `[int, .. GL_BUFFER_SIZE - 2]`)
10535
10536 * Semantic changes
10537 * Types with owned pointers or custom destructors move by default,
10538 eliminating the `move` keyword
10539 * All foreign functions are considered unsafe
10540 * &mut is now unaliasable
10541 * Writes to borrowed @mut pointers are prevented dynamically
10542 * () has size 0
10543 * The name of the main function can be customized using #[main]
10544 * The default type of an inferred closure is &fn instead of @fn
10545 * `use` statements may no longer be "chained" - they cannot import
10546 identifiers imported by previous `use` statements
10547 * `use` statements are crate relative, importing from the "top"
10548 of the crate by default. Paths may be prefixed with `super::`
10549 or `self::` to change the search behavior.
10550 * Method visibility is inherited from the implementation declaration
10551 * Structural records have been removed
10552 * Many more types can be used in static items, including enums
10553 'static-lifetime pointers and vectors
10554 * Pattern matching over vectors improved and expanded
10555 * Typechecking of closure types has been overhauled to
10556 improve inference and eliminate unsoundness
10557 * Macros leave scope at the end of modules, unless that module is
10558 tagged with #[macro_escape]
10559
10560 * Libraries
10561 * Added big integers to `std::bigint`
10562 * Removed `core::oldcomm` module
10563 * Added pipe-based `core::comm` module
10564 * Numeric traits have been reorganized under `core::num`
10565 * `vec::slice` finally returns a slice
10566 * `debug!` and friends don't require a format string, e.g. `debug!(Foo)`
10567 * Containers reorganized around traits in `core::container`
10568 * `core::dvec` removed, `~[T]` is a drop-in replacement
10569 * `core::send_map` renamed to `core::hashmap`
10570 * `std::map` removed; replaced with `core::hashmap`
10571 * `std::treemap` reimplemented as an owned balanced tree
10572 * `std::deque` and `std::smallintmap` reimplemented as owned containers
10573 * `core::trie` added as a fast ordered map for integer keys
10574 * Set types added to `core::hashmap`, `core::trie` and `std::treemap`
10575 * `Ord` split into `Ord` and `TotalOrd`. `Ord` is still used to
10576 overload the comparison operators, whereas `TotalOrd` is used
10577 by certain container types
10578
10579 * Other
10580 * Replaced the 'cargo' package manager with 'rustpkg'
10581 * Added all-purpose 'rust' tool
10582 * `rustc --test` now supports benchmarks with the `#[bench]` attribute
10583 * rustc now *attempts* to offer spelling suggestions
10584 * Improved support for ARM and Android
10585 * Preliminary MIPS backend
10586 * Improved foreign function ABI implementation for x86, x86_64
10587 * Various memory usage improvements
10588 * Rust code may be embedded in foreign code under limited circumstances
10589 * Inline assembler supported by new asm!() syntax extension.
10590
62682a34 10591
b039eaaf 10592Version 0.5 (2012-12-21)
62682a34 10593===========================
1a4d82fc
JJ
10594
10595 * ~900 changes, numerous bugfixes
10596
10597 * Syntax changes
10598 * Removed `<-` move operator
10599 * Completed the transition from the `#fmt` extension syntax to `fmt!`
10600 * Removed old fixed length vector syntax - `[T]/N`
10601 * New token-based quasi-quoters, `quote_tokens!`, `quote_expr!`, etc.
10602 * Macros may now expand to items and statements
10603 * `a.b()` is always parsed as a method call, never as a field projection
10604 * `Eq` and `IterBytes` implementations can be automatically generated
10605 with `#[deriving_eq]` and `#[deriving_iter_bytes]` respectively
10606 * Removed the special crate language for `.rc` files
10607 * Function arguments may consist of any irrefutable pattern
10608
10609 * Semantic changes
10610 * `&` and `~` pointers may point to objects
10611 * Tuple structs - `struct Foo(Bar, Baz)`. Will replace newtype enums.
10612 * Enum variants may be structs
10613 * Destructors can be added to all nominal types with the Drop trait
10614 * Structs and nullary enum variants may be constants
10615 * Values that cannot be implicitly copied are now automatically moved
10616 without writing `move` explicitly
10617 * `&T` may now be coerced to `*T`
10618 * Coercions happen in `let` statements as well as function calls
10619 * `use` statements now take crate-relative paths
10620 * The module and type namespaces have been merged so that static
10621 method names can be resolved under the trait in which they are
10622 declared
10623
10624 * Improved support for language features
10625 * Trait inheritance works in many scenarios
10626 * More support for explicit self arguments in methods - `self`, `&self`
10627 `@self`, and `~self` all generally work as expected
10628 * Static methods work in more situations
10629 * Experimental: Traits may declare default methods for the implementations
10630 to use
10631
10632 * Libraries
10633 * New condition handling system in `core::condition`
10634 * Timsort added to `std::sort`
10635 * New priority queue, `std::priority_queue`
10636 * Pipes for serializable types, `std::flatpipes'
10637 * Serialization overhauled to be trait-based
10638 * Expanded `getopts` definitions
10639 * Moved futures to `std`
10640 * More functions are pure now
10641 * `core::comm` renamed to `oldcomm`. Still deprecated
10642 * `rustdoc` and `cargo` are libraries now
10643
10644 * Misc
10645 * Added a preliminary REPL, `rusti`
10646 * License changed from MIT to dual MIT/APL2
10647
62682a34 10648
b039eaaf 10649Version 0.4 (2012-10-15)
62682a34 10650==========================
1a4d82fc
JJ
10651
10652 * ~2000 changes, numerous bugfixes
10653
10654 * Syntax
10655 * All keywords are now strict and may not be used as identifiers anywhere
10656 * Keyword removal: 'again', 'import', 'check', 'new', 'owned', 'send',
10657 'of', 'with', 'to', 'class'.
10658 * Classes are replaced with simpler structs
10659 * Explicit method self types
10660 * `ret` became `return` and `alt` became `match`
10661 * `import` is now `use`; `use is now `extern mod`
10662 * `extern mod { ... }` is now `extern { ... }`
10663 * `use mod` is the recommended way to import modules
10664 * `pub` and `priv` replace deprecated export lists
10665 * The syntax of `match` pattern arms now uses fat arrow (=>)
10666 * `main` no longer accepts an args vector; use `os::args` instead
10667
10668 * Semantics
10669 * Trait implementations are now coherent, ala Haskell typeclasses
10670 * Trait methods may be static
10671 * Argument modes are deprecated
10672 * Borrowed pointers are much more mature and recommended for use
10673 * Strings and vectors in the static region are stored in constant memory
10674 * Typestate was removed
10675 * Resolution rewritten to be more reliable
10676 * Support for 'dual-mode' data structures (freezing and thawing)
10677
10678 * Libraries
10679 * Most binary operators can now be overloaded via the traits in
10680 `core::ops'
10681 * `std::net::url` for representing URLs
10682 * Sendable hash maps in `core::send_map`
10683 * `core::task' gained a (currently unsafe) task-local storage API
10684
10685 * Concurrency
10686 * An efficient new intertask communication primitive called the pipe,
10687 along with a number of higher-level channel types, in `core::pipes`
10688 * `std::arc`, an atomically reference counted, immutable, shared memory
10689 type
10690 * `std::sync`, various exotic synchronization tools based on arcs and pipes
10691 * Futures are now based on pipes and sendable
10692 * More robust linked task failure
10693 * Improved task builder API
10694
10695 * Other
10696 * Improved error reporting
10697 * Preliminary JIT support
10698 * Preliminary work on precise GC
10699 * Extensive architectural improvements to rustc
10700 * Begun a transition away from buggy C++-based reflection (shape) code to
10701 Rust-based (visitor) code
10702 * All hash functions and tables converted to secure, randomized SipHash
10703
62682a34 10704
b039eaaf 10705Version 0.3 (2012-07-12)
62682a34 10706========================
1a4d82fc
JJ
10707
10708 * ~1900 changes, numerous bugfixes
10709
10710 * New coding conveniences
10711 * Integer-literal suffix inference
10712 * Per-item control over warnings, errors
10713 * #[cfg(windows)] and #[cfg(unix)] attributes
10714 * Documentation comments
10715 * More compact closure syntax
10716 * 'do' expressions for treating higher-order functions as
10717 control structures
10718 * *-patterns (wildcard extended to all constructor fields)
10719
10720 * Semantic cleanup
10721 * Name resolution pass and exhaustiveness checker rewritten
10722 * Region pointers and borrow checking supersede alias
10723 analysis
10724 * Init-ness checking is now provided by a region-based liveness
10725 pass instead of the typestate pass; same for last-use analysis
10726 * Extensive work on region pointers
10727
10728 * Experimental new language features
10729 * Slices and fixed-size, interior-allocated vectors
10730 * #!-comments for lang versioning, shell execution
10731 * Destructors and iface implementation for classes;
10732 type-parameterized classes and class methods
10733 * 'const' type kind for types that can be used to implement
10734 shared-memory concurrency patterns
10735
10736 * Type reflection
10737
10738 * Removal of various obsolete features
10739 * Keywords: 'be', 'prove', 'syntax', 'note', 'mutable', 'bind',
10740 'crust', 'native' (now 'extern'), 'cont' (now 'again')
10741
10742 * Constructs: do-while loops ('do' repurposed), fn binding,
10743 resources (replaced by destructors)
10744
10745 * Compiler reorganization
10746 * Syntax-layer of compiler split into separate crate
10747 * Clang (from LLVM project) integrated into build
10748 * Typechecker split into sub-modules
10749
10750 * New library code
10751 * New time functions
10752 * Extension methods for many built-in types
10753 * Arc: atomic-refcount read-only / exclusive-use shared cells
10754 * Par: parallel map and search routines
10755 * Extensive work on libuv interface
10756 * Much vector code moved to libraries
10757 * Syntax extensions: #line, #col, #file, #mod, #stringify,
10758 #include, #include_str, #include_bin
10759
10760 * Tool improvements
10761 * Cargo automatically resolves dependencies
10762
62682a34 10763
b039eaaf 10764Version 0.2 (2012-03-29)
62682a34 10765=========================
1a4d82fc
JJ
10766
10767 * >1500 changes, numerous bugfixes
10768
10769 * New docs and doc tooling
10770
10771 * New port: FreeBSD x86_64
10772
10773 * Compilation model enhancements
10774 * Generics now specialized, multiply instantiated
10775 * Functions now inlined across separate crates
10776
10777 * Scheduling, stack and threading fixes
10778 * Noticeably improved message-passing performance
10779 * Explicit schedulers
10780 * Callbacks from C
10781 * Helgrind clean
10782
10783 * Experimental new language features
10784 * Operator overloading
10785 * Region pointers
10786 * Classes
10787
10788 * Various language extensions
10789 * C-callback function types: 'crust fn ...'
10790 * Infinite-loop construct: 'loop { ... }'
10791 * Shorten 'mutable' to 'mut'
10792 * Required mutable-local qualifier: 'let mut ...'
10793 * Basic glob-exporting: 'export foo::*;'
10794 * Alt now exhaustive, 'alt check' for runtime-checked
10795 * Block-function form of 'for' loop, with 'break' and 'ret'.
10796
10797 * New library code
10798 * AST quasi-quote syntax extension
10799 * Revived libuv interface
10800 * New modules: core::{future, iter}, std::arena
10801 * Merged per-platform std::{os*, fs*} to core::{libc, os}
10802 * Extensive cleanup, regularization in libstd, libcore
10803
62682a34 10804
b039eaaf 10805Version 0.1 (2012-01-20)
62682a34 10806===============================
1a4d82fc
JJ
10807
10808 * Most language features work, including:
10809 * Unique pointers, unique closures, move semantics
10810 * Interface-constrained generics
10811 * Static interface dispatch
10812 * Stack growth
10813 * Multithread task scheduling
10814 * Typestate predicates
10815 * Failure unwinding, destructors
10816 * Pattern matching and destructuring assignment
10817 * Lightweight block-lambda syntax
10818 * Preliminary macro-by-example
10819
10820 * Compiler works with the following configurations:
10821 * Linux: x86 and x86_64 hosts and targets
cc61c64b 10822 * macOS: x86 and x86_64 hosts and targets
1a4d82fc
JJ
10823 * Windows: x86 hosts and targets
10824
10825 * Cross compilation / multi-target configuration supported.
10826
10827 * Preliminary API-documentation and package-management tools included.
10828
10829Known issues:
10830
10831 * Documentation is incomplete.
10832
10833 * Performance is below intended target.
10834
10835 * Standard library APIs are subject to extensive change, reorganization.
10836
10837 * Language-level versioning is not yet operational - future code will
10838 break unexpectedly.