]> git.proxmox.com Git - rustc.git/blame - RELEASES.md
New upstream version 1.13.0+dfsg1
[rustc.git] / RELEASES.md
CommitLineData
9e0c209e
SL
1Version 1.13.0 (2016-11-10)
2===========================
3
4Language
5--------
6
7* [Stabilize the `?` operator][36995]. `?` is a simple way to propagate
8 errors, like the `try!` macro, described in [RFC 0243].
9* [Stabilize macros in type position][36014]. Described in [RFC 873].
10* [Stabilize attributes on statements][36995]. Described in [RFC 0016].
11* [Fix `#[derive]` for empty tuple structs/variants][35728]
12* [Fix lifetime rules for 'if' conditions][36029]
13* [Avoid loading and parsing unconfigured non-inline modules][36482]
14
15Compiler
16--------
17
18* [Add the `-C link-arg` argument][36574]
19* [Remove the old AST-based backend from rustc_trans][35764]
20* [Don't enable NEON by default on armv7 Linux][35814]
21* [Fix debug line number info for macro expansions][35238]
22* [Do not emit "class method" debuginfo for types that are not
23 DICompositeType][36008]
24* [Warn about multiple conflicting #[repr] hints][34623]
25* [When sizing DST, don't double-count nested struct prefixes][36351]
26* [Default RUST_MIN_STACK to 16MiB for now][36505]
27* [Improve rlib metadata format][36551]. Reduces rlib size significantly.
28* [Reject macros with empty repetitions to avoid infinite loop][36721]
29* [Expand macros without recursing to avoid stack overflows][36214]
30
31Diagnostics
32-----------
33
34* [Replace macro backtraces with labeled local uses][35702]
35* [Improve error message for missplaced doc comments][33922]
36* [Buffer unix and lock windows to prevent message interleaving][35975]
37* [Update lifetime errors to specifically note temporaries][36171]
38* [Special case a few colors for Windows][36178]
39* [Suggest `use self` when such an import resolves][36289]
40* [Be more specific when type parameter shadows primitive type][36338]
41* Many minor improvements
42
43Compile-time Optimizations
44--------------------------
45
46* [Compute and cache HIR hashes at beginning][35854]
47* [Don't hash types in loan paths][36004]
48* [Cache projections in trans][35761]
49* [Optimize the parser's last token handling][36527]
50* [Only instantiate #[inline] functions in codegen units referencing
51 them][36524]. This leads to big improvements in cases where crates export
52 define many inline functions without using them directly.
53* [Lazily allocate TypedArena's first chunk][36592]
54* [Don't allocate during default HashSet creation][36734]
55
56Stabilized APIs
57---------------
58
59* [`checked_abs`]
60* [`wrapping_abs`]
61* [`overflowing_abs`]
62* [`RefCell::try_borrow`]
63* [`RefCell::try_borrow_mut`]
64
65Libraries
66---------
67
68* [Add `assert_ne!` and `debug_assert_ne!`][35074]
69* [Make `vec_deque::Drain`, `hash_map::Drain`, and `hash_set::Drain`
70 covariant][35354]
71* [Implement `AsRef<[T]>` for `std::slice::Iter`][35559]
72* [Implement `Debug` for `std::vec::IntoIter`][35707]
73* [`CString`: avoid excessive growth just to 0-terminate][35871]
74* [Implement `CoerceUnsized` for `{Cell, RefCell, UnsafeCell}`][35627]
75* [Use arc4rand on FreeBSD][35884]
76* [memrchr: Correct aligned offset computation][35969]
77* [Improve Demangling of Rust Symbols][36059]
78* [Use monotonic time in condition variables][35048]
79* [Implement `Debug` for `std::path::{Components,Iter}`][36101]
80* [Implement conversion traits for `char`][35755]
81* [Fix illegal instruction caused by overflow in channel cloning][36104]
82* [Zero first byte of CString on drop][36264]
83* [Inherit overflow checks for sum and product][36372]
84* [Add missing Eq implementations][36423]
85* [Implement `Debug` for `DirEntry`][36631]
86* [When `getaddrinfo` returns `EAI_SYSTEM` retrieve actual error from
87 `errno`][36754]
88* [`SipHasher`] is deprecated. Use [`DefaultHasher`].
89* [Implement more traits for `std::io::ErrorKind`][35911]
90* [Optimize BinaryHeap bounds checking][36072]
91* [Work around pointer aliasing issue in `Vec::extend_from_slice`,
92 `extend_with_element`][36355]
93* [Fix overflow checking in unsigned pow()][34942]
94
95Cargo
96-----
97
98* This release includes security fixes to both curl and OpenSSL.
99* [Fix transitive doctests when panic=abort][cargo/3021]
100* [Add --all-features flag to cargo][cargo/3038]
101* [Reject path-based dependencies in `cargo package`][cargo/3060]
102* [Don't parse the home directory more than once][cargo/3078]
103* [Don't try to generate Cargo.lock on empty workspaces][cargo/3092]
104* [Update OpenSSL to 1.0.2j][cargo/3121]
105* [Add license and license_file to cargo metadata output][cargo/3110]
106* [Make crates-io registry URL optional in config; ignore all changes to
107 source.crates-io][cargo/3089]
108* [Don't download dependencies from other platforms][cargo/3123]
109* [Build transitive dev-dependencies when needed][cargo/3125]
110* [Add support for per-target rustflags in .cargo/config][cargo/3157]
111* [Avoid updating registry when adding existing deps][cargo/3144]
112* [Warn about path overrides that won't work][cargo/3136]
113* [Use workspaces during `cargo install`][cargo/3146]
114* [Leak mspdbsrv.exe processes on Windows][cargo/3162]
115* [Add --message-format flag][cargo/3000]
116* [Pass target environment for rustdoc][cargo/3205]
117* [Use `CommandExt::exec` for `cargo run` on Unix][cargo/2818]
118* [Update curl and curl-sys][cargo/3241]
119* [Call rustdoc test with the correct cfg flags of a package][cargo/3242]
120
121Tooling
122-------
123
124* [rustdoc: Add the `--sysroot` argument][36586]
125* [rustdoc: Fix a couple of issues with the search results][35655]
126* [rustdoc: remove the `!` from macro URLs and titles][35234]
127* [gdb: Fix pretty-printing special-cased Rust types][35585]
128* [rustdoc: Filter more incorrect methods inherited through Deref][36266]
129
130Misc
131----
132
133* [Remove unmaintained style guide][35124]
134* [Add s390x support][36369]
135* [Initial work at Haiku OS support][36727]
136* [Add mips-uclibc targets][35734]
137* [Crate-ify compiler-rt into compiler-builtins][35021]
138* [Add rustc version info (git hash + date) to dist tarball][36213]
139* Many documentation improvements
140
141Compatibility Notes
142-------------------
143
144* [`SipHasher`] is deprecated. Use [`DefaultHasher`].
145* [Deny (by default) transmuting from fn item types to pointer-sized
146 types][34923]. Continuing the long transition to zero-sized fn items,
147 per [RFC 401].
148* [Fix `#[derive]` for empty tuple structs/variants][35728].
149 Part of [RFC 1506].
150* [Issue deprecation warnings for safe accesses to extern statics][36173]
151* [Fix lifetime rules for 'if' conditions][36029].
152* [Inherit overflow checks for sum and product][36372].
153* [Forbid user-defined macros named "macro_rules"][36730].
154
155[33922]: https://github.com/rust-lang/rust/pull/33922
156[34623]: https://github.com/rust-lang/rust/pull/34623
157[34923]: https://github.com/rust-lang/rust/pull/34923
158[34942]: https://github.com/rust-lang/rust/pull/34942
159[34982]: https://github.com/rust-lang/rust/pull/34982
160[35021]: https://github.com/rust-lang/rust/pull/35021
161[35048]: https://github.com/rust-lang/rust/pull/35048
162[35074]: https://github.com/rust-lang/rust/pull/35074
163[35124]: https://github.com/rust-lang/rust/pull/35124
164[35234]: https://github.com/rust-lang/rust/pull/35234
165[35238]: https://github.com/rust-lang/rust/pull/35238
166[35354]: https://github.com/rust-lang/rust/pull/35354
167[35559]: https://github.com/rust-lang/rust/pull/35559
168[35585]: https://github.com/rust-lang/rust/pull/35585
169[35627]: https://github.com/rust-lang/rust/pull/35627
170[35655]: https://github.com/rust-lang/rust/pull/35655
171[35702]: https://github.com/rust-lang/rust/pull/35702
172[35707]: https://github.com/rust-lang/rust/pull/35707
173[35728]: https://github.com/rust-lang/rust/pull/35728
174[35734]: https://github.com/rust-lang/rust/pull/35734
175[35755]: https://github.com/rust-lang/rust/pull/35755
176[35761]: https://github.com/rust-lang/rust/pull/35761
177[35764]: https://github.com/rust-lang/rust/pull/35764
178[35814]: https://github.com/rust-lang/rust/pull/35814
179[35854]: https://github.com/rust-lang/rust/pull/35854
180[35871]: https://github.com/rust-lang/rust/pull/35871
181[35884]: https://github.com/rust-lang/rust/pull/35884
182[35911]: https://github.com/rust-lang/rust/pull/35911
183[35969]: https://github.com/rust-lang/rust/pull/35969
184[35975]: https://github.com/rust-lang/rust/pull/35975
185[36004]: https://github.com/rust-lang/rust/pull/36004
186[36008]: https://github.com/rust-lang/rust/pull/36008
187[36014]: https://github.com/rust-lang/rust/pull/36014
188[36029]: https://github.com/rust-lang/rust/pull/36029
189[36059]: https://github.com/rust-lang/rust/pull/36059
190[36072]: https://github.com/rust-lang/rust/pull/36072
191[36101]: https://github.com/rust-lang/rust/pull/36101
192[36104]: https://github.com/rust-lang/rust/pull/36104
193[36171]: https://github.com/rust-lang/rust/pull/36171
194[36173]: https://github.com/rust-lang/rust/pull/36173
195[36178]: https://github.com/rust-lang/rust/pull/36178
196[36213]: https://github.com/rust-lang/rust/pull/36213
197[36214]: https://github.com/rust-lang/rust/pull/36214
198[36264]: https://github.com/rust-lang/rust/pull/36264
199[36266]: https://github.com/rust-lang/rust/pull/36266
200[36289]: https://github.com/rust-lang/rust/pull/36289
201[36338]: https://github.com/rust-lang/rust/pull/36338
202[36351]: https://github.com/rust-lang/rust/pull/36351
203[36355]: https://github.com/rust-lang/rust/pull/36355
204[36369]: https://github.com/rust-lang/rust/pull/36369
205[36372]: https://github.com/rust-lang/rust/pull/36372
206[36423]: https://github.com/rust-lang/rust/pull/36423
207[36482]: https://github.com/rust-lang/rust/pull/36482
208[36505]: https://github.com/rust-lang/rust/pull/36505
209[36524]: https://github.com/rust-lang/rust/pull/36524
210[36527]: https://github.com/rust-lang/rust/pull/36527
211[36551]: https://github.com/rust-lang/rust/pull/36551
212[36574]: https://github.com/rust-lang/rust/pull/36574
213[36586]: https://github.com/rust-lang/rust/pull/36586
214[36592]: https://github.com/rust-lang/rust/pull/36592
215[36631]: https://github.com/rust-lang/rust/pull/36631
216[36639]: https://github.com/rust-lang/rust/pull/36639
217[36721]: https://github.com/rust-lang/rust/pull/36721
218[36727]: https://github.com/rust-lang/rust/pull/36727
219[36730]: https://github.com/rust-lang/rust/pull/36730
220[36734]: https://github.com/rust-lang/rust/pull/36734
221[36754]: https://github.com/rust-lang/rust/pull/36754
222[36995]: https://github.com/rust-lang/rust/pull/36995
223[RFC 0016]: https://github.com/rust-lang/rfcs/blob/master/text/0016-more-attributes.md
224[RFC 0243]: https://github.com/rust-lang/rfcs/blob/master/text/0243-trait-based-exception-handling.md
225[RFC 1506]: https://github.com/rust-lang/rfcs/blob/master/text/1506-adt-kinds.md
226[RFC 401]: https://github.com/rust-lang/rfcs/blob/master/text/0401-coercions.md
227[RFC 873]: https://github.com/rust-lang/rfcs/blob/master/text/0873-type-macros.md
228[cargo/2818]: https://github.com/rust-lang/cargo/pull/2818
229[cargo/3000]: https://github.com/rust-lang/cargo/pull/3000
230[cargo/3021]: https://github.com/rust-lang/cargo/pull/3021
231[cargo/3038]: https://github.com/rust-lang/cargo/pull/3038
232[cargo/3060]: https://github.com/rust-lang/cargo/pull/3060
233[cargo/3078]: https://github.com/rust-lang/cargo/pull/3078
234[cargo/3089]: https://github.com/rust-lang/cargo/pull/3089
235[cargo/3092]: https://github.com/rust-lang/cargo/pull/3092
236[cargo/3110]: https://github.com/rust-lang/cargo/pull/3110
237[cargo/3121]: https://github.com/rust-lang/cargo/pull/3121
238[cargo/3123]: https://github.com/rust-lang/cargo/pull/3123
239[cargo/3125]: https://github.com/rust-lang/cargo/pull/3125
240[cargo/3136]: https://github.com/rust-lang/cargo/pull/3136
241[cargo/3144]: https://github.com/rust-lang/cargo/pull/3144
242[cargo/3146]: https://github.com/rust-lang/cargo/pull/3146
243[cargo/3157]: https://github.com/rust-lang/cargo/pull/3157
244[cargo/3162]: https://github.com/rust-lang/cargo/pull/3162
245[cargo/3205]: https://github.com/rust-lang/cargo/pull/3205
246[cargo/3241]: https://github.com/rust-lang/cargo/pull/3241
247[cargo/3242]: https://github.com/rust-lang/cargo/pull/3242
248[rustup]: https://www.rustup.rs
249[`checked_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.checked_abs
250[`wrapping_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.wrapping_abs
251[`overflowing_abs`]: https://doc.rust-lang.org/std/primitive.i32.html#method.overflowing_abs
252[`RefCell::try_borrow`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow
253[`RefCell::try_borrow_mut`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_mut
254[`SipHasher`]: https://doc.rust-lang.org/std/hash/struct.SipHasher.html
255[`DefaultHasher`]: https://doc.rust-lang.org/std/collections/hash_map/struct.DefaultHasher.html
256
257
258Version 1.12.1 (2016-10-20)
259===========================
260
261Regression Fixes
262----------------
263
264* [ICE: 'rustc' panicked at 'assertion failed: concrete_substs.is_normalized_for_trans()' #36381][36381]
265* [Confusion with double negation and booleans][36856]
266* [rustc 1.12.0 fails with SIGSEGV in release mode (syn crate 0.8.0)][36875]
267* [Rustc 1.12.0 Windows build of `ethcore` crate fails with LLVM error][36924]
268* [1.12.0: High memory usage when linking in release mode with debug info][36926]
269* [Corrupted memory after updated to 1.12][36936]
270* ["Let NullaryConstructor = something;" causes internal compiler error: "tried to overwrite interned AdtDef"][37026]
271* [Fix ICE: inject bitcast if types mismatch for invokes/calls/stores][37112]
272* [debuginfo: Handle spread_arg case in MIR-trans in a more stable way.][37153]
273
274[36381]: https://github.com/rust-lang/rust/issues/36381
275[36856]: https://github.com/rust-lang/rust/issues/36856
276[36875]: https://github.com/rust-lang/rust/issues/36875
277[36924]: https://github.com/rust-lang/rust/issues/36924
278[36926]: https://github.com/rust-lang/rust/issues/36926
279[36936]: https://github.com/rust-lang/rust/issues/36936
280[37026]: https://github.com/rust-lang/rust/issues/37026
281[37112]: https://github.com/rust-lang/rust/issues/37112
282[37153]: https://github.com/rust-lang/rust/issues/37153
283
284
5bcae85e
SL
285Version 1.12.0 (2016-09-29)
286===========================
287
288Highlights
289----------
290
291* [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)]
292 (https://github.com/rust-lang/rust/pull/34096).
293 This translation pass is far simpler than the previous AST->LLVM pass, and
294 creates opportunities to perform new optimizations directly on the MIR. It
295 was previously described [on the Rust blog]
296 (https://blog.rust-lang.org/2016/04/19/MIR.html).
297* [`rustc` presents a new, more readable error format, along with
298 machine-readable JSON error output for use by IDEs]
299 (https://github.com/rust-lang/rust/pull/35401).
300 Most common editors supporting Rust have been updated to work with it. It was
301 previously described [on the Rust blog]
302 (https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
303
304Compiler
305--------
306
307* [`rustc` translates code to LLVM IR via its own "middle" IR (MIR)]
308 (https://github.com/rust-lang/rust/pull/34096).
309 This translation pass is far simpler than the previous AST->LLVM pass, and
310 creates opportunities to perform new optimizations directly on the MIR. It
311 was previously described [on the Rust blog]
312 (https://blog.rust-lang.org/2016/04/19/MIR.html).
313* [Print the Rust target name, not the LLVM target name, with
9e0c209e 314 `--print target-list`]
5bcae85e
SL
315 (https://github.com/rust-lang/rust/pull/35489)
316* [The computation of `TypeId` is correct in some cases where it was previously
317 producing inconsistent results]
318 (https://github.com/rust-lang/rust/pull/35267)
319* [The `mips-unknown-linux-gnu` target uses hardware floating point by default]
320 (https://github.com/rust-lang/rust/pull/34910)
321* [The `rustc` arguments, `--print target-cpus`, `--print target-features`,
322 `--print relocation-models`, and `--print code-models` print the available
323 options to the `-C target-cpu`, `-C target-feature`, `-C relocation-model` and
324 `-C code-model` code generation arguments]
325 (https://github.com/rust-lang/rust/pull/34845)
326* [`rustc` supports three new MUSL targets on ARM: `arm-unknown-linux-musleabi`,
327 `arm-unknown-linux-musleabihf`, and `armv7-unknown-linux-musleabihf`]
328 (https://github.com/rust-lang/rust/pull/35060).
329 These targets produce statically-linked binaries. There are no binary release
330 builds yet though.
331
332Diagnostics
333-----------
334
335* [`rustc` presents a new, more readable error format, along with
336 machine-readable JSON error output for use by IDEs]
337 (https://github.com/rust-lang/rust/pull/35401).
338 Most common editors supporting Rust have been updated to work with it. It was
339 previously described [on the Rust blog]
340 (https://blog.rust-lang.org/2016/08/10/Shape-of-errors-to-come.html).
341* [In error descriptions, references are now described in plain english,
342 instead of as "&-ptr"]
343 (https://github.com/rust-lang/rust/pull/35611)
344* [In error type descriptions, unknown numeric types are named `{integer}` or
345 `{float}` instead of `_`]
346 (https://github.com/rust-lang/rust/pull/35080)
347* [`rustc` emits a clearer error when inner attributes follow a doc comment]
348 (https://github.com/rust-lang/rust/pull/34676)
349
350Language
351--------
352
353* [`macro_rules!` invocations can be made within `macro_rules!` invocations]
354 (https://github.com/rust-lang/rust/pull/34925)
355* [`macro_rules!` meta-variables are hygienic]
356 (https://github.com/rust-lang/rust/pull/35453)
357* [`macro_rules!` `tt` matchers can be reparsed correctly, making them much more
358 useful]
359 (https://github.com/rust-lang/rust/pull/34908)
360* [`macro_rules!` `stmt` matchers correctly consume the entire contents when
9e0c209e 361 inside non-braces invocations]
5bcae85e
SL
362 (https://github.com/rust-lang/rust/pull/34886)
363* [Semicolons are properly required as statement delimeters inside
364 `macro_rules!` invocations]
365 (https://github.com/rust-lang/rust/pull/34660)
366* [`cfg_attr` works on `path` attributes]
367 (https://github.com/rust-lang/rust/pull/34546)
368
369Stabilized APIs
370---------------
371
372* [`Cell::as_ptr`]
373 (https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr)
374* [`RefCell::as_ptr`]
375 (https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.as_ptr)
376* [`IpAddr::is_unspecified`]
377 (https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_unspecified)
378* [`IpAddr::is_loopback`]
379 (https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_loopback)
380* [`IpAddr::is_multicast`]
381 (https://doc.rust-lang.org/std/net/enum.IpAddr.html#method.is_multicast)
382* [`Ipv4Addr::is_unspecified`]
383 (https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified)
384* [`Ipv6Addr::octets`]
385 (https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.octets)
386* [`LinkedList::contains`]
387 (https://doc.rust-lang.org/std/collections/linked_list/struct.LinkedList.html#method.contains)
388* [`VecDeque::contains`]
389 (https://doc.rust-lang.org/std/collections/vec_deque/struct.VecDeque.html#method.contains)
390* [`ExitStatusExt::from_raw`]
391 (https://doc.rust-lang.org/std/os/unix/process/trait.ExitStatusExt.html#tymethod.from_raw).
392 Both on Unix and Windows.
393* [`Receiver::recv_timeout`]
394 (https://doc.rust-lang.org/std/sync/mpsc/struct.Receiver.html#method.recv_timeout)
395* [`RecvTimeoutError`]
396 (https://doc.rust-lang.org/std/sync/mpsc/enum.RecvTimeoutError.html)
397* [`BinaryHeap::peek_mut`]
398 (https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.peek_mut)
399* [`PeekMut`]
400 (https://doc.rust-lang.org/std/collections/binary_heap/struct.PeekMut.html)
401* [`iter::Product`]
402 (https://doc.rust-lang.org/std/iter/trait.Product.html)
403* [`iter::Sum`]
404 (https://doc.rust-lang.org/std/iter/trait.Sum.html)
405* [`OccupiedEntry::remove_entry`]
406 (https://doc.rust-lang.org/std/collections/btree_map/struct.OccupiedEntry.html#method.remove_entry)
407* [`VacantEntry::into_key`]
408 (https://doc.rust-lang.org/std/collections/btree_map/struct.VacantEntry.html#method.into_key)
409
410Libraries
411---------
412
413* [The `format!` macro and friends now allow a single argument to be formatted
414 in multiple styles]
415 (https://github.com/rust-lang/rust/pull/33642)
416* [The lifetime bounds on `[T]::binary_search_by` and
417 `[T]::binary_search_by_key` have been adjusted to be more flexible]
418 (https://github.com/rust-lang/rust/pull/34762)
419* [`Option` implements `From` for its contained type]
420 (https://github.com/rust-lang/rust/pull/34828)
421* [`Cell`, `RefCell` and `UnsafeCell` implement `From` for their contained type]
422 (https://github.com/rust-lang/rust/pull/35392)
423* [`RwLock` panics if the reader count overflows]
424 (https://github.com/rust-lang/rust/pull/35378)
425* [`vec_deque::Drain`, `hash_map::Drain` and `hash_set::Drain` are covariant]
426 (https://github.com/rust-lang/rust/pull/35354)
427* [`vec::Drain` and `binary_heap::Drain` are covariant]
428 (https://github.com/rust-lang/rust/pull/34951)
429* [`Cow<str>` implements `FromIterator` for `char`, `&str` and `String`]
430 (https://github.com/rust-lang/rust/pull/35064)
431* [Sockets on Linux are correctly closed in subprocesses via `SOCK_CLOEXEC`]
432 (https://github.com/rust-lang/rust/pull/34946)
433* [`hash_map::Entry`, `hash_map::VacantEntry` and `hash_map::OccupiedEntry`
434 implement `Debug`]
435 (https://github.com/rust-lang/rust/pull/34946)
436* [`btree_map::Entry`, `btree_map::VacantEntry` and `btree_map::OccupiedEntry`
437 implement `Debug`]
438 (https://github.com/rust-lang/rust/pull/34885)
439* [`String` implements `AddAssign`]
440 (https://github.com/rust-lang/rust/pull/34890)
441* [Variadic `extern fn` pointers implement the `Clone`, `PartialEq`, `Eq`,
442 `PartialOrd`, `Ord`, `Hash`, `fmt::Pointer`, and `fmt::Debug` traits]
443 (https://github.com/rust-lang/rust/pull/34879)
444* [`FileType` implements `Debug`]
445 (https://github.com/rust-lang/rust/pull/34757)
446* [References to `Mutex` and `RwLock` are unwind-safe]
447 (https://github.com/rust-lang/rust/pull/34756)
448* [`mpsc::sync_channel` `Receiver`s return any available message before
449 reporting a disconnect]
450 (https://github.com/rust-lang/rust/pull/34731)
451* [Unicode definitions have been updated to 9.0]
452 (https://github.com/rust-lang/rust/pull/34599)
453* [`env` iterators implement `DoubleEndedIterator`]
454 (https://github.com/rust-lang/rust/pull/33312)
455
456Cargo
457-----
458
459* [Support local mirrors of registries]
460 (https://github.com/rust-lang/cargo/pull/2857)
461* [Add support for command aliases]
462 (https://github.com/rust-lang/cargo/pull/2679)
463* [Allow `opt-level="s"` / `opt-level="z"` in profile overrides]
464 (https://github.com/rust-lang/cargo/pull/3007)
465* [Make `cargo doc --open --target` work as expected]
466 (https://github.com/rust-lang/cargo/pull/2988)
467* [Speed up noop registry updates]
468 (https://github.com/rust-lang/cargo/pull/2974)
469* [Update OpenSSL]
470 (https://github.com/rust-lang/cargo/pull/2971)
471* [Fix `--panic=abort` with plugins]
472 (https://github.com/rust-lang/cargo/pull/2954)
473* [Always pass `-C metadata` to the compiler]
474 (https://github.com/rust-lang/cargo/pull/2946)
475* [Fix depending on git repos with workspaces]
476 (https://github.com/rust-lang/cargo/pull/2938)
477* [Add a `--lib` flag to `cargo new`]
478 (https://github.com/rust-lang/cargo/pull/2921)
479* [Add `http.cainfo` for custom certs]
480 (https://github.com/rust-lang/cargo/pull/2917)
481* [Indicate the compilation profile after compiling]
482 (https://github.com/rust-lang/cargo/pull/2909)
483* [Allow enabling features for dependencies with `--features`]
484 (https://github.com/rust-lang/cargo/pull/2876)
485* [Add `--jobs` flag to `cargo package`]
486 (https://github.com/rust-lang/cargo/pull/2867)
487* [Add `--dry-run` to `cargo publish`]
488 (https://github.com/rust-lang/cargo/pull/2849)
489* [Add support for `RUSTDOCFLAGS`]
490 (https://github.com/rust-lang/cargo/pull/2794)
491
492Performance
493-----------
494
5bcae85e
SL
495* [`panic::catch_unwind` is more optimized]
496 (https://github.com/rust-lang/rust/pull/35444)
497* [`panic::catch_unwind` no longer accesses thread-local storage on entry]
498 (https://github.com/rust-lang/rust/pull/34866)
499
500Tooling
501-------
502
503* [Test binaries now support a `--test-threads` argument to specify the number
504 of threads used to run tests, and which acts the same as the
505 `RUST_TEST_THREADS` environment variable]
506 (https://github.com/rust-lang/rust/pull/35414)
507* [The test runner now emits a warning when tests run over 60 seconds]
508 (https://github.com/rust-lang/rust/pull/35405)
509* [rustdoc: Fix methods in search results]
510 (https://github.com/rust-lang/rust/pull/34752)
511* [`rust-lldb` warns about unsupported versions of LLDB]
512 (https://github.com/rust-lang/rust/pull/34646)
513* [Rust releases now come with source packages that can be installed by rustup
514 via `rustup component add rust-src`]
515 (https://github.com/rust-lang/rust/pull/34366).
516 The resulting source code can be used by tools and IDES, located in the
517 sysroot under `lib/rustlib/src`.
518
519Misc
520----
521
522* [The compiler can now be built against LLVM 3.9]
523 (https://github.com/rust-lang/rust/pull/35594)
524* Many minor improvements to the documentation.
525* [The Rust exception handling "personality" routine is now written in Rust]
526 (https://github.com/rust-lang/rust/pull/34832)
527
528Compatibility Notes
529-------------------
530
531* [When printing Windows `OsStr`s, unpaired surrogate codepoints are escaped
532 with the lowercase format instead of the uppercase]
533 (https://github.com/rust-lang/rust/pull/35084)
534* [When formatting strings, if "precision" is specified, the "fill",
535 "align" and "width" specifiers are no longer ignored]
536 (https://github.com/rust-lang/rust/pull/34544)
537* [The `Debug` impl for strings no longer escapes all non-ASCII characters]
538 (https://github.com/rust-lang/rust/pull/34485)
539
540
541Version 1.11.0 (2016-08-18)
542===========================
543
544Language
545--------
546
547* [`cfg_attr` works on `path` attributes]
548 (https://github.com/rust-lang/rust/pull/34546)
549* [Support nested `cfg_attr` attributes]
550 (https://github.com/rust-lang/rust/pull/34216)
551* [Allow statement-generating braced macro invocations at the end of blocks]
552 (https://github.com/rust-lang/rust/pull/34436)
553* [Macros can be expanded inside of trait definitions]
554 (https://github.com/rust-lang/rust/pull/34213)
555* [`#[macro_use]` works properly when it is itself expanded from a macro]
556 (https://github.com/rust-lang/rust/pull/34032)
557
558Stabilized APIs
559---------------
560
561* [`BinaryHeap::append`]
562 (https://doc.rust-lang.org/std/collections/binary_heap/struct.BinaryHeap.html#method.append)
563* [`BTreeMap::append`]
564 (https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.append)
565* [`BTreeMap::split_off`]
566 (https://doc.rust-lang.org/std/collections/btree_map/struct.BTreeMap.html#method.split_off)
567* [`BTreeSet::append`]
568 (https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.append)
569* [`BTreeSet::split_off`]
570 (https://doc.rust-lang.org/std/collections/btree_set/struct.BTreeSet.html#method.split_off)
571* [`f32::to_degrees`]
572 (https://doc.rust-lang.org/std/primitive.f32.html#method.to_degrees)
573 (in libcore - previously stabilized in libstd)
574* [`f32::to_radians`]
575 (https://doc.rust-lang.org/std/primitive.f32.html#method.to_radians)
576 (in libcore - previously stabilized in libstd)
577* [`f64::to_degrees`]
578 (https://doc.rust-lang.org/std/primitive.f64.html#method.to_degrees)
579 (in libcore - previously stabilized in libstd)
580* [`f64::to_radians`]
581 (https://doc.rust-lang.org/std/primitive.f64.html#method.to_radians)
582 (in libcore - previously stabilized in libstd)
583* [`Iterator::sum`]
584 (https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
585* [`Iterator::product`]
586 (https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.sum)
587* [`Cell::get_mut`]
588 (https://doc.rust-lang.org/std/cell/struct.Cell.html#method.get_mut)
589* [`RefCell::get_mut`]
590 (https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.get_mut)
591
592Libraries
593---------
594
595* [The `thread_local!` macro supports multiple definitions in a single
596 invocation, and can apply attributes]
597 (https://github.com/rust-lang/rust/pull/34077)
598* [`Cow` implements `Default`]
599 (https://github.com/rust-lang/rust/pull/34305)
600* [`Wrapping` implements binary, octal, lower-hex and upper-hex
601 `Display` formatting]
602 (https://github.com/rust-lang/rust/pull/34190)
603* [The range types implement `Hash`]
604 (https://github.com/rust-lang/rust/pull/34180)
605* [`lookup_host` ignores unknown address types]
606 (https://github.com/rust-lang/rust/pull/34067)
607* [`assert_eq!` accepts a custom error message, like `assert!` does]
608 (https://github.com/rust-lang/rust/pull/33976)
609* [The main thread is now called "main" instead of "&lt;main&gt;"]
610 (https://github.com/rust-lang/rust/pull/33803)
611
612Cargo
613-----
614
615* [Disallow specifying features of transitive deps]
616 (https://github.com/rust-lang/cargo/pull/2821)
617* [Add color support for Windows consoles]
618 (https://github.com/rust-lang/cargo/pull/2804)
619* [Fix `harness = false` on `[lib]` sections]
620 (https://github.com/rust-lang/cargo/pull/2795)
621* [Don't panic when `links` contains a '.']
622 (https://github.com/rust-lang/cargo/pull/2787)
623* [Build scripts can emit warnings]
624 (https://github.com/rust-lang/cargo/pull/2630),
625 and `-vv` prints warnings for all crates.
626* [Ignore file locks on OS X NFS mounts]
627 (https://github.com/rust-lang/cargo/pull/2720)
628* [Don't warn about `package.metadata` keys]
629 (https://github.com/rust-lang/cargo/pull/2668).
630 This provides room for expansion by arbitrary tools.
631* [Add support for cdylib crate types]
632 (https://github.com/rust-lang/cargo/pull/2741)
633* [Prevent publishing crates when files are dirty]
634 (https://github.com/rust-lang/cargo/pull/2781)
635* [Don't fetch all crates on clean]
636 (https://github.com/rust-lang/cargo/pull/2704)
637* [Propagate --color option to rustc]
638 (https://github.com/rust-lang/cargo/pull/2779)
639* [Fix `cargo doc --open` on Windows]
640 (https://github.com/rust-lang/cargo/pull/2780)
641* [Improve autocompletion]
642 (https://github.com/rust-lang/cargo/pull/2772)
643* [Configure colors of stderr as well as stdout]
644 (https://github.com/rust-lang/cargo/pull/2739)
645
646Performance
647-----------
648
649* [Caching projections speeds up type check dramatically for some
650 workloads]
651 (https://github.com/rust-lang/rust/pull/33816)
652* [The default `HashMap` hasher is SipHash 1-3 instead of SipHash 2-4]
653 (https://github.com/rust-lang/rust/pull/33940)
654 This hasher is faster, but is believed to provide sufficient
655 protection from collision attacks.
656* [Comparison of `Ipv4Addr` is 10x faster]
657 (https://github.com/rust-lang/rust/pull/33891)
658
659Rustdoc
660-------
661
662* [Fix empty implementation section on some module pages]
663 (https://github.com/rust-lang/rust/pull/34536)
664* [Fix inlined renamed reexports in import lists]
665 (https://github.com/rust-lang/rust/pull/34479)
666* [Fix search result layout for enum variants and struct fields]
667 (https://github.com/rust-lang/rust/pull/34477)
668* [Fix issues with source links to external crates]
669 (https://github.com/rust-lang/rust/pull/34387)
670* [Fix redirect pages for renamed reexports]
671 (https://github.com/rust-lang/rust/pull/34245)
672
673Tooling
674-------
675
676* [rustc is better at finding the MSVC toolchain]
677 (https://github.com/rust-lang/rust/pull/34492)
678* [When emitting debug info, rustc emits frame pointers for closures,
679 shims and glue, as it does for all other functions]
680 (https://github.com/rust-lang/rust/pull/33909)
681* [rust-lldb warns about unsupported versions of LLDB]
682 (https://github.com/rust-lang/rust/pull/34646)
683* Many more errors have been given error codes and extended
684 explanations
685* API documentation continues to be improved, with many new examples
686
687Misc
688----
689
690* [rustc no longer hangs when dependencies recursively re-export
691 submodules]
692 (https://github.com/rust-lang/rust/pull/34542)
693* [rustc requires LLVM 3.7+]
694 (https://github.com/rust-lang/rust/pull/34104)
695* [The 'How Safe and Unsafe Interact' chapter of The Rustonomicon was
696 rewritten]
697 (https://github.com/rust-lang/rust/pull/33895)
698* [rustc support 16-bit pointer sizes]
699 (https://github.com/rust-lang/rust/pull/33460).
700 No targets use this yet, but it works toward AVR support.
701
702Compatibility Notes
703-------------------
704
705* [`const`s and `static`s may not have unsized types]
706 (https://github.com/rust-lang/rust/pull/34443)
707* [The new follow-set rules that place restrictions on `macro_rules!`
708 in order to ensure syntax forward-compatibility have been enabled]
709 (https://github.com/rust-lang/rust/pull/33982)
710 This was an [ammendment to RFC 550]
711 (https://github.com/rust-lang/rfcs/pull/1384),
712 and has been a warning since 1.10.
713* [`cfg` attribute process has been refactored to fix various bugs]
714 (https://github.com/rust-lang/rust/pull/33706).
715 This causes breakage in some corner cases.
716
717
a7813a04
XL
718Version 1.10.0 (2016-07-07)
719===========================
720
721Language
722--------
723
724* [Allow `concat_idents!` in type positions as well as in expression
725 positions]
726 (https://github.com/rust-lang/rust/pull/33735).
727* [`Copy` types are required to have a trivial implementation of `Clone`]
728 (https://github.com/rust-lang/rust/pull/33420).
729 [RFC 1521](https://github.com/rust-lang/rfcs/blob/master/text/1521-copy-clone-semantics.md).
730* [Single-variant enums support the `#[repr(..)]` attribute]
731 (https://github.com/rust-lang/rust/pull/33355).
732* [Fix `#[derive(RustcEncodable)]` in the presence of other `encode` methods]
733 (https://github.com/rust-lang/rust/pull/32908).
734* [`panic!` can be converted to a runtime abort with the
735 `-C panic=abort` flag]
736 (https://github.com/rust-lang/rust/pull/32900).
737 [RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
738* [Add a new crate type, 'cdylib']
739 (https://github.com/rust-lang/rust/pull/33553).
740 cdylibs are dynamic libraries suitable for loading by non-Rust hosts.
741 [RFC 1510](https://github.com/rust-lang/rfcs/blob/master/text/1510-rdylib.md).
742 Note that Cargo does not yet directly support cdylibs.
743
744Stabilized APIs
745---------------
746
747* `os::windows::fs::OpenOptionsExt::access_mode`
748* `os::windows::fs::OpenOptionsExt::share_mode`
749* `os::windows::fs::OpenOptionsExt::custom_flags`
750* `os::windows::fs::OpenOptionsExt::attributes`
751* `os::windows::fs::OpenOptionsExt::security_qos_flags`
752* `os::unix::fs::OpenOptionsExt::custom_flags`
753* [`sync::Weak::new`]
754 (http://doc.rust-lang.org/alloc/arc/struct.Weak.html#method.new)
755* `Default for sync::Weak`
756* [`panic::set_hook`]
757 (http://doc.rust-lang.org/std/panic/fn.set_hook.html)
758* [`panic::take_hook`]
759 (http://doc.rust-lang.org/std/panic/fn.take_hook.html)
760* [`panic::PanicInfo`]
761 (http://doc.rust-lang.org/std/panic/struct.PanicInfo.html)
762* [`panic::PanicInfo::payload`]
763 (http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.payload)
764* [`panic::PanicInfo::location`]
765 (http://doc.rust-lang.org/std/panic/struct.PanicInfo.html#method.location)
766* [`panic::Location`]
767 (http://doc.rust-lang.org/std/panic/struct.Location.html)
768* [`panic::Location::file`]
769 (http://doc.rust-lang.org/std/panic/struct.Location.html#method.file)
770* [`panic::Location::line`]
771 (http://doc.rust-lang.org/std/panic/struct.Location.html#method.line)
772* [`ffi::CStr::from_bytes_with_nul`]
773 (http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul)
774* [`ffi::CStr::from_bytes_with_nul_unchecked`]
775 (http://doc.rust-lang.org/std/ffi/struct.CStr.html#method.from_bytes_with_nul_unchecked)
776* [`ffi::FromBytesWithNulError`]
777 (http://doc.rust-lang.org/std/ffi/struct.FromBytesWithNulError.html)
778* [`fs::Metadata::modified`]
779 (http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.modified)
780* [`fs::Metadata::accessed`]
781 (http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.accessed)
782* [`fs::Metadata::created`]
783 (http://doc.rust-lang.org/std/fs/struct.Metadata.html#method.created)
784* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange`
785* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak`
786* `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key`
787* `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}`
788* [`SocketAddr::is_unnamed`]
789 (http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.is_unnamed)
790* [`SocketAddr::as_pathname`]
791 (http://doc.rust-lang.org/std/os/unix/net/struct.SocketAddr.html#method.as_pathname)
792* [`UnixStream::connect`]
793 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.connect)
794* [`UnixStream::pair`]
795 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.pair)
796* [`UnixStream::try_clone`]
797 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.try_clone)
798* [`UnixStream::local_addr`]
799 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.local_addr)
800* [`UnixStream::peer_addr`]
801 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.peer_addr)
802* [`UnixStream::set_read_timeout`]
803 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
804* [`UnixStream::set_write_timeout`]
805 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
806* [`UnixStream::read_timeout`]
807 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.read_timeout)
808* [`UnixStream::write_timeout`]
809 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.write_timeout)
810* [`UnixStream::set_nonblocking`]
811 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.set_nonblocking)
812* [`UnixStream::take_error`]
813 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.take_error)
814* [`UnixStream::shutdown`]
815 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html#method.shutdown)
816* Read/Write/RawFd impls for `UnixStream`
817* [`UnixListener::bind`]
818 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.bind)
819* [`UnixListener::accept`]
820 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.accept)
821* [`UnixListener::try_clone`]
822 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.try_clone)
823* [`UnixListener::local_addr`]
824 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.local_addr)
825* [`UnixListener::set_nonblocking`]
826 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.set_nonblocking)
827* [`UnixListener::take_error`]
828 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.take_error)
829* [`UnixListener::incoming`]
830 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixListener.html#method.incoming)
831* RawFd impls for `UnixListener`
832* [`UnixDatagram::bind`]
833 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.bind)
834* [`UnixDatagram::unbound`]
835 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.unbound)
836* [`UnixDatagram::pair`]
837 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.pair)
838* [`UnixDatagram::connect`]
839 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.connect)
840* [`UnixDatagram::try_clone`]
841 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.try_clone)
842* [`UnixDatagram::local_addr`]
843 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.local_addr)
844* [`UnixDatagram::peer_addr`]
845 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.peer_addr)
846* [`UnixDatagram::recv_from`]
847 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv_from)
848* [`UnixDatagram::recv`]
849 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.recv)
850* [`UnixDatagram::send_to`]
851 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send_to)
852* [`UnixDatagram::send`]
853 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.send)
854* [`UnixDatagram::set_read_timeout`]
855 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_read_timeout)
856* [`UnixDatagram::set_write_timeout`]
857 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_write_timeout)
858* [`UnixDatagram::read_timeout`]
859 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.read_timeout)
860* [`UnixDatagram::write_timeout`]
861 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.write_timeout)
862* [`UnixDatagram::set_nonblocking`]
863 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.set_nonblocking)
864* [`UnixDatagram::take_error`]
865 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.take_error)
866* [`UnixDatagram::shutdown`]
867 (http://doc.rust-lang.org/std/os/unix/net/struct.UnixDatagram.html#method.shutdown)
868* RawFd impls for `UnixDatagram`
869* `{BTree,Hash}Map::values_mut`
870* [`<[_]>::binary_search_by_key`]
871 (http://doc.rust-lang.org/beta/std/primitive.slice.html#method.binary_search_by_key)
872
873Libraries
874---------
875
876* [The `abs_sub` method of floats is deprecated]
877 (https://github.com/rust-lang/rust/pull/33664).
878 The semantics of this minor method are subtle and probably not what
879 most people want.
880* [Add implementation of Ord for Cell<T> and RefCell<T> where T: Ord]
881 (https://github.com/rust-lang/rust/pull/33306).
882* [On Linux, if `HashMap`s can't be initialized with `getrandom` they
883 will fall back to `/dev/urandom` temporarily to avoid blocking
884 during early boot]
885 (https://github.com/rust-lang/rust/pull/33086).
886* [Implemented negation for wrapping numerals]
887 (https://github.com/rust-lang/rust/pull/33067).
888* [Implement `Clone` for `binary_heap::IntoIter`]
889 (https://github.com/rust-lang/rust/pull/33050).
890* [Implement `Display` and `Hash` for `std::num::Wrapping`]
891 (https://github.com/rust-lang/rust/pull/33023).
5bcae85e 892* [Add `Default` implementation for `&CStr`, `CString`]
a7813a04
XL
893 (https://github.com/rust-lang/rust/pull/32990).
894* [Implement `From<Vec<T>>` and `Into<Vec<T>>` for `VecDeque<T>`]
895 (https://github.com/rust-lang/rust/pull/32866).
896* [Implement `Default` for `UnsafeCell`, `fmt::Error`, `Condvar`,
897 `Mutex`, `RwLock`]
898 (https://github.com/rust-lang/rust/pull/32785).
899
900Cargo
901-----
902* [Cargo.toml supports the `profile.*.panic` option]
903 (https://github.com/rust-lang/cargo/pull/2687).
904 This controls the runtime behavior of the `panic!` macro
905 and can be either "unwind" (the default), or "abort".
906 [RFC 1513](https://github.com/rust-lang/rfcs/blob/master/text/1513-less-unwinding.md).
907* [Don't throw away errors with `-p` arguments]
908 (https://github.com/rust-lang/cargo/pull/2723).
909* [Report status to stderr instead of stdout]
910 (https://github.com/rust-lang/cargo/pull/2693).
911* [Build scripts are passed a `CARGO_MANIFEST_LINKS` environment
912 variable that corresponds to the `links` field of the manifest]
913 (https://github.com/rust-lang/cargo/pull/2710).
914* [Ban keywords from crate names]
915 (https://github.com/rust-lang/cargo/pull/2707).
916* [Canonicalize `CARGO_HOME` on Windows]
917 (https://github.com/rust-lang/cargo/pull/2604).
918* [Retry network requests]
919 (https://github.com/rust-lang/cargo/pull/2396).
920 By default they are retried twice, which can be customized with the
921 `net.retry` value in `.cargo/config`.
922* [Don't print extra error info for failing subcommands]
923 (https://github.com/rust-lang/cargo/pull/2674).
924* [Add `--force` flag to `cargo install`]
925 (https://github.com/rust-lang/cargo/pull/2405).
926* [Don't use `flock` on NFS mounts]
927 (https://github.com/rust-lang/cargo/pull/2623).
928* [Prefer building `cargo install` artifacts in temporary directories]
929 (https://github.com/rust-lang/cargo/pull/2610).
930 Makes it possible to install multiple crates in parallel.
931* [Add `cargo test --doc`]
932 (https://github.com/rust-lang/cargo/pull/2578).
933* [Add `cargo --explain`]
934 (https://github.com/rust-lang/cargo/pull/2551).
935* [Don't print warnings when `-q` is passed]
936 (https://github.com/rust-lang/cargo/pull/2576).
937* [Add `cargo doc --lib` and `--bin`]
938 (https://github.com/rust-lang/cargo/pull/2577).
939* [Don't require build script output to be UTF-8]
940 (https://github.com/rust-lang/cargo/pull/2560).
941* [Correctly attempt multiple git usernames]
942 (https://github.com/rust-lang/cargo/pull/2584).
943
944Performance
945-----------
946
947* [rustc memory usage was reduced by refactoring the context used for
948 type checking]
949 (https://github.com/rust-lang/rust/pull/33425).
950* [Speed up creation of `HashMap`s by caching the random keys used
951 to initialize the hash state]
952 (https://github.com/rust-lang/rust/pull/33318).
953* [The `find` implementation for `Chain` iterators is 2x faster]
954 (https://github.com/rust-lang/rust/pull/33289).
955* [Trait selection optimizations speed up type checking by 15%]
956 (https://github.com/rust-lang/rust/pull/33138).
957* [Efficient trie lookup for boolean Unicode properties]
958 (https://github.com/rust-lang/rust/pull/33098).
959 10x faster than the previous lookup tables.
960* [Special case `#[derive(Copy, Clone)]` to avoid bloat]
961 (https://github.com/rust-lang/rust/pull/31414).
962
963Usability
964---------
965
966* Many incremental improvements to documentation and rustdoc.
967* [rustdoc: List blanket trait impls]
968 (https://github.com/rust-lang/rust/pull/33514).
969* [rustdoc: Clean up ABI rendering]
970 (https://github.com/rust-lang/rust/pull/33151).
971* [Indexing with the wrong type produces a more informative error]
972 (https://github.com/rust-lang/rust/pull/33401).
973* [Improve diagnostics for constants being used in irrefutable patterns]
974 (https://github.com/rust-lang/rust/pull/33406).
975* [When many method candidates are in scope limit the suggestions to 10]
976 (https://github.com/rust-lang/rust/pull/33338).
977* [Remove confusing suggestion when calling a `fn` type]
978 (https://github.com/rust-lang/rust/pull/33325).
979* [Do not suggest changing `&mut self` to `&mut mut self`]
980 (https://github.com/rust-lang/rust/pull/33319).
981
982Misc
983----
984
985* [Update i686-linux-android features to match Android ABI]
986 (https://github.com/rust-lang/rust/pull/33651).
987* [Update aarch64-linux-android features to match Android ABI]
988 (https://github.com/rust-lang/rust/pull/33500).
989* [`std` no longer prints backtraces on platforms where the running
990 module must be loaded with `env::current_exe`, which can't be relied
991 on](https://github.com/rust-lang/rust/pull/33554).
992* This release includes std binaries for the i586-unknown-linux-gnu,
993 i686-unknown-linux-musl, and armv7-linux-androideabi targets. The
994 i586 target is for old x86 hardware without SSE2, and the armv7
995 target is for Android running on modern ARM architectures.
996* [The `rust-gdb` and `rust-lldb` scripts are distributed on all
997 Unix platforms](https://github.com/rust-lang/rust/pull/32835).
998* [On Unix the runtime aborts by calling `libc::abort` instead of
999 generating an illegal instruction]
1000 (https://github.com/rust-lang/rust/pull/31457).
1001* [Rust is now bootstrapped from the previous release of Rust,
1002 instead of a snapshot from an arbitrary commit]
1003 (https://github.com/rust-lang/rust/pull/32942).
1004
1005Compatibility Notes
1006-------------------
1007
1008* [`AtomicBool` is now bool-sized, not word-sized]
1009 (https://github.com/rust-lang/rust/pull/33579).
1010* [`target_env` for Linux ARM targets is just `gnu`, not
1011 `gnueabihf`, `gnueabi`, etc]
1012 (https://github.com/rust-lang/rust/pull/33403).
1013* [Consistently panic on overflow in `Duration::new`]
1014 (https://github.com/rust-lang/rust/pull/33072).
1015* [Change `String::truncate` to panic less]
1016 (https://github.com/rust-lang/rust/pull/32977).
1017* [Add `:block` to the follow set for `:ty` and `:path`]
1018 (https://github.com/rust-lang/rust/pull/32945).
1019 Affects how macros are parsed.
1020* [Fix macro hygiene bug]
1021 (https://github.com/rust-lang/rust/pull/32923).
1022* [Feature-gated attributes on macro-generated macro invocations are
1023 now rejected]
1024 (https://github.com/rust-lang/rust/pull/32791).
1025* [Suppress fallback and ambiguity errors during type inference]
1026 (https://github.com/rust-lang/rust/pull/32258).
1027 This caused some minor changes to type inference.
1028
1029
54a0048b
SL
1030Version 1.9.0 (2016-05-26)
1031==========================
1032
1033Language
1034--------
1035
1036* The `#[deprecated]` attribute when applied to an API will generate
1037 warnings when used. The warnings may be suppressed with
1038 `#[allow(deprecated)]`. [RFC 1270].
1039* [`fn` item types are zero sized, and each `fn` names a unique
1040 type][1.9fn]. This will break code that transmutes `fn`s, so calling
1041 `transmute` on a `fn` type will generate a warning for a few cycles,
1042 then will be converted to an error.
1043* [Field and method resolution understand visibility, so private
1044 fields and methods cannot prevent the proper use of public fields
1045 and methods][1.9fv].
1046* [The parser considers unicode codepoints in the
1047 `PATTERN_WHITE_SPACE` category to be whitespace][1.9ws].
1048
1049Stabilized APIs
1050---------------
1051
1052* [`std::panic`]
1053* [`std::panic::catch_unwind`][] (renamed from `recover`)
1054* [`std::panic::resume_unwind`][] (renamed from `propagate`)
1055* [`std::panic::AssertUnwindSafe`][] (renamed from `AssertRecoverSafe`)
1056* [`std::panic::UnwindSafe`][] (renamed from `RecoverSafe`)
1057* [`str::is_char_boundary`]
1058* [`<*const T>::as_ref`]
1059* [`<*mut T>::as_ref`]
1060* [`<*mut T>::as_mut`]
1061* [`AsciiExt::make_ascii_uppercase`]
1062* [`AsciiExt::make_ascii_lowercase`]
1063* [`char::decode_utf16`]
1064* [`char::DecodeUtf16`]
1065* [`char::DecodeUtf16Error`]
1066* [`char::DecodeUtf16Error::unpaired_surrogate`]
1067* [`BTreeSet::take`]
1068* [`BTreeSet::replace`]
1069* [`BTreeSet::get`]
1070* [`HashSet::take`]
1071* [`HashSet::replace`]
1072* [`HashSet::get`]
1073* [`OsString::with_capacity`]
1074* [`OsString::clear`]
1075* [`OsString::capacity`]
1076* [`OsString::reserve`]
1077* [`OsString::reserve_exact`]
1078* [`OsStr::is_empty`]
1079* [`OsStr::len`]
1080* [`std::os::unix::thread`]
1081* [`RawPthread`]
1082* [`JoinHandleExt`]
1083* [`JoinHandleExt::as_pthread_t`]
1084* [`JoinHandleExt::into_pthread_t`]
1085* [`HashSet::hasher`]
1086* [`HashMap::hasher`]
1087* [`CommandExt::exec`]
1088* [`File::try_clone`]
1089* [`SocketAddr::set_ip`]
1090* [`SocketAddr::set_port`]
1091* [`SocketAddrV4::set_ip`]
1092* [`SocketAddrV4::set_port`]
1093* [`SocketAddrV6::set_ip`]
1094* [`SocketAddrV6::set_port`]
1095* [`SocketAddrV6::set_flowinfo`]
1096* [`SocketAddrV6::set_scope_id`]
1097* [`slice::copy_from_slice`]
1098* [`ptr::read_volatile`]
1099* [`ptr::write_volatile`]
1100* [`OpenOptions::create_new`]
1101* [`TcpStream::set_nodelay`]
1102* [`TcpStream::nodelay`]
1103* [`TcpStream::set_ttl`]
1104* [`TcpStream::ttl`]
1105* [`TcpStream::set_only_v6`]
1106* [`TcpStream::only_v6`]
1107* [`TcpStream::take_error`]
1108* [`TcpStream::set_nonblocking`]
1109* [`TcpListener::set_ttl`]
1110* [`TcpListener::ttl`]
1111* [`TcpListener::set_only_v6`]
1112* [`TcpListener::only_v6`]
1113* [`TcpListener::take_error`]
1114* [`TcpListener::set_nonblocking`]
1115* [`UdpSocket::set_broadcast`]
1116* [`UdpSocket::broadcast`]
1117* [`UdpSocket::set_multicast_loop_v4`]
1118* [`UdpSocket::multicast_loop_v4`]
1119* [`UdpSocket::set_multicast_ttl_v4`]
1120* [`UdpSocket::multicast_ttl_v4`]
1121* [`UdpSocket::set_multicast_loop_v6`]
1122* [`UdpSocket::multicast_loop_v6`]
1123* [`UdpSocket::set_multicast_ttl_v6`]
1124* [`UdpSocket::multicast_ttl_v6`]
1125* [`UdpSocket::set_ttl`]
1126* [`UdpSocket::ttl`]
1127* [`UdpSocket::set_only_v6`]
1128* [`UdpSocket::only_v6`]
1129* [`UdpSocket::join_multicast_v4`]
1130* [`UdpSocket::join_multicast_v6`]
1131* [`UdpSocket::leave_multicast_v4`]
1132* [`UdpSocket::leave_multicast_v6`]
1133* [`UdpSocket::take_error`]
1134* [`UdpSocket::connect`]
1135* [`UdpSocket::send`]
1136* [`UdpSocket::recv`]
1137* [`UdpSocket::set_nonblocking`]
1138
1139Libraries
1140---------
1141
1142* [`std::sync::Once` is poisoned if its initialization function
1143 fails][1.9o].
1144* [`cell::Ref` and `cell::RefMut` can contain unsized types][1.9cu].
1145* [Most types implement `fmt::Debug`][1.9db].
1146* [The default buffer size used by `BufReader` and `BufWriter` was
1147 reduced to 8K, from 64K][1.9bf]. This is in line with the buffer size
1148 used by other languages.
1149* [`Instant`, `SystemTime` and `Duration` implement `+=` and `-=`.
1150 `Duration` additionally implements `*=` and `/=`][1.9ta].
1151* [`Skip` is a `DoubleEndedIterator`][1.9sk].
1152* [`From<[u8; 4]>` is implemented for `Ipv4Addr`][1.9fi].
1153* [`Chain` implements `BufRead`][1.9ch].
1154* [`HashMap`, `HashSet` and iterators are covariant][1.9hc].
1155
1156Cargo
1157-----
1158
1159* [Cargo can now run concurrently][1.9cc].
1160* [Top-level overrides allow specific revisions of crates to be
1161 overridden through the entire crate graph][1.9ct]. This is intended
1162 to make upgrades easier for large projects, by allowing crates to be
1163 forked temporarily until they've been upgraded and republished.
1164* [Cargo exports a `CARGO_PKG_AUTHORS` environment variable][1.9cp].
1165* [Cargo will pass the contents of the `RUSTFLAGS` variable to `rustc`
1166 on the commandline][1.9cf]. `rustc` arguments can also be specified
1167 in the `build.rustflags` configuration key.
1168
1169Performance
1170-----------
1171
a7813a04
XL
1172* [The time complexity of comparing variables for equivalence during type
1173 unification is reduced from _O_(_n_!) to _O_(_n_)][1.9tu]. This leads
1174 to major compilation time improvement in some scenarios.
54a0048b
SL
1175* [`ToString` is specialized for `str`, giving it the same performance
1176 as `to_owned`][1.9ts].
1177* [Spawning processes with `Command::output` no longer creates extra
1178 threads][1.9sp].
1179* [`#[derive(PartialEq)]` and `#[derive(PartialOrd)]` emit less code
1180 for C-like enums][1.9cl].
1181
1182Misc
1183----
1184
1185* [Passing the `--quiet` flag to a test runner will produce
1186 much-abbreviated output][1.9q].
1187* The Rust Project now publishes std binaries for the
1188 `mips-unknown-linux-musl`, `mipsel-unknown-linux-musl`, and
1189 `i586-pc-windows-msvc` targets.
1190
1191Compatibility Notes
1192-------------------
1193
1194* [`std::sync::Once` is poisoned if its initialization function
1195 fails][1.9o].
1196* [It is illegal to define methods with the same name in overlapping
1197 inherent `impl` blocks][1.9sn].
1198* [`fn` item types are zero sized, and each `fn` names a unique
1199 type][1.9fn]. This will break code that transmutes `fn`s, so calling
1200 `transmute` on a `fn` type will generate a warning for a few cycles,
1201 then will be converted to an error.
1202* [Improvements to const evaluation may trigger new errors when integer
1203 literals are out of range][1.9ce].
1204
1205
1206[1.9bf]: https://github.com/rust-lang/rust/pull/32695
1207[1.9cc]: https://github.com/rust-lang/cargo/pull/2486
1208[1.9ce]: https://github.com/rust-lang/rust/pull/30587
1209[1.9cf]: https://github.com/rust-lang/cargo/pull/2241
1210[1.9ch]: https://github.com/rust-lang/rust/pull/32541
1211[1.9cl]: https://github.com/rust-lang/rust/pull/31977
1212[1.9cp]: https://github.com/rust-lang/cargo/pull/2465
1213[1.9ct]: https://github.com/rust-lang/cargo/pull/2385
1214[1.9cu]: https://github.com/rust-lang/rust/pull/32652
1215[1.9db]: https://github.com/rust-lang/rust/pull/32054
1216[1.9fi]: https://github.com/rust-lang/rust/pull/32050
1217[1.9fn]: https://github.com/rust-lang/rust/pull/31710
1218[1.9fv]: https://github.com/rust-lang/rust/pull/31938
1219[1.9hc]: https://github.com/rust-lang/rust/pull/32635
1220[1.9o]: https://github.com/rust-lang/rust/pull/32325
1221[1.9q]: https://github.com/rust-lang/rust/pull/31887
1222[1.9sk]: https://github.com/rust-lang/rust/pull/31700
1223[1.9sn]: https://github.com/rust-lang/rust/pull/31925
1224[1.9sp]: https://github.com/rust-lang/rust/pull/31618
1225[1.9ta]: https://github.com/rust-lang/rust/pull/32448
1226[1.9ts]: https://github.com/rust-lang/rust/pull/32586
1227[1.9tu]: https://github.com/rust-lang/rust/pull/32062
1228[1.9ws]: https://github.com/rust-lang/rust/pull/29734
1229[RFC 1270]: https://github.com/rust-lang/rfcs/blob/master/text/1270-deprecation.md
1230[`<*const T>::as_ref`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_ref
1231[`<*mut T>::as_mut`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_mut
1232[`<*mut T>::as_ref`]: http://doc.rust-lang.org/nightly/std/primitive.pointer.html#method.as_ref
1233[`slice::copy_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.copy_from_slice
1234[`AsciiExt::make_ascii_lowercase`]: http://doc.rust-lang.org/nightly/std/ascii/trait.AsciiExt.html#tymethod.make_ascii_lowercase
1235[`AsciiExt::make_ascii_uppercase`]: http://doc.rust-lang.org/nightly/std/ascii/trait.AsciiExt.html#tymethod.make_ascii_uppercase
1236[`BTreeSet::get`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.get
1237[`BTreeSet::replace`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.replace
1238[`BTreeSet::take`]: http://doc.rust-lang.org/nightly/collections/btree/set/struct.BTreeSet.html#method.take
1239[`CommandExt::exec`]: http://doc.rust-lang.org/nightly/std/os/unix/process/trait.CommandExt.html#tymethod.exec
1240[`File::try_clone`]: http://doc.rust-lang.org/nightly/std/fs/struct.File.html#method.try_clone
1241[`HashMap::hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.hasher
1242[`HashSet::get`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.get
1243[`HashSet::hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.hasher
1244[`HashSet::replace`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.replace
1245[`HashSet::take`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.take
1246[`JoinHandleExt::as_pthread_t`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html#tymethod.as_pthread_t
1247[`JoinHandleExt::into_pthread_t`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html#tymethod.into_pthread_t
1248[`JoinHandleExt`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/trait.JoinHandleExt.html
1249[`OpenOptions::create_new`]: http://doc.rust-lang.org/nightly/std/fs/struct.OpenOptions.html#method.create_new
1250[`OsStr::is_empty`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsStr.html#method.is_empty
1251[`OsStr::len`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsStr.html#method.len
1252[`OsString::capacity`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.capacity
1253[`OsString::clear`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.clear
1254[`OsString::reserve_exact`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.reserve_exact
1255[`OsString::reserve`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.reserve
1256[`OsString::with_capacity`]: http://doc.rust-lang.org/nightly/std/ffi/struct.OsString.html#method.with_capacity
1257[`RawPthread`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/type.RawPthread.html
1258[`SocketAddr::set_ip`]: http://doc.rust-lang.org/nightly/std/net/enum.SocketAddr.html#method.set_ip
1259[`SocketAddr::set_port`]: http://doc.rust-lang.org/nightly/std/net/enum.SocketAddr.html#method.set_port
1260[`SocketAddrV4::set_ip`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV4.html#method.set_ip
1261[`SocketAddrV4::set_port`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV4.html#method.set_port
1262[`SocketAddrV6::set_flowinfo`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_flowinfo
1263[`SocketAddrV6::set_ip`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_ip
1264[`SocketAddrV6::set_port`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_port
1265[`SocketAddrV6::set_scope_id`]: http://doc.rust-lang.org/nightly/std/net/struct.SocketAddrV6.html#method.set_scope_id
1266[`TcpListener::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.only_v6
1267[`TcpListener::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nonblocking
1268[`TcpListener::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_only_v6
1269[`TcpListener::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_ttl
1270[`TcpListener::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.take_error
1271[`TcpListener::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.ttl
1272[`TcpStream::nodelay`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.nodelay
1273[`TcpStream::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.only_v6
1274[`TcpStream::set_nodelay`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nodelay
1275[`TcpStream::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_nonblocking
1276[`TcpStream::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_only_v6
1277[`TcpStream::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_ttl
1278[`TcpStream::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.take_error
1279[`TcpStream::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.ttl
1280[`UdpSocket::broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.broadcast
1281[`UdpSocket::connect`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.connect
1282[`UdpSocket::join_multicast_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.join_multicast_v4
1283[`UdpSocket::join_multicast_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.join_multicast_v6
1284[`UdpSocket::leave_multicast_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.leave_multicast_v4
1285[`UdpSocket::leave_multicast_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.leave_multicast_v6
1286[`UdpSocket::multicast_loop_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_loop_v4
1287[`UdpSocket::multicast_loop_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_loop_v6
1288[`UdpSocket::multicast_ttl_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_ttl_v4
1289[`UdpSocket::multicast_ttl_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.multicast_ttl_v6
1290[`UdpSocket::only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.only_v6
1291[`UdpSocket::recv`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.recv
1292[`UdpSocket::send`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.send
1293[`UdpSocket::set_broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_broadcast
1294[`UdpSocket::set_multicast_loop_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_loop_v4
1295[`UdpSocket::set_multicast_loop_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_loop_v6
1296[`UdpSocket::set_multicast_ttl_v4`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_ttl_v4
1297[`UdpSocket::set_multicast_ttl_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_multicast_ttl_v6
1298[`UdpSocket::set_nonblocking`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_nonblocking
1299[`UdpSocket::set_only_v6`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_only_v6
1300[`UdpSocket::set_ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.set_ttl
1301[`UdpSocket::take_error`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.take_error
1302[`UdpSocket::ttl`]: http://doc.rust-lang.org/nightly/std/net/struct.UdpSocket.html#method.ttl
1303[`char::DecodeUtf16Error::unpaired_surrogate`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16Error.html#method.unpaired_surrogate
1304[`char::DecodeUtf16Error`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16Error.html
1305[`char::DecodeUtf16`]: http://doc.rust-lang.org/nightly/std/char/struct.DecodeUtf16.html
1306[`char::decode_utf16`]: http://doc.rust-lang.org/nightly/std/char/fn.decode_utf16.html
1307[`ptr::read_volatile`]: http://doc.rust-lang.org/nightly/std/ptr/fn.read_volatile.html
1308[`ptr::write_volatile`]: http://doc.rust-lang.org/nightly/std/ptr/fn.write_volatile.html
1309[`std::os::unix::thread`]: http://doc.rust-lang.org/nightly/std/os/unix/thread/index.html
1310[`std::panic::AssertUnwindSafe`]: http://doc.rust-lang.org/nightly/std/panic/struct.AssertUnwindSafe.html
1311[`std::panic::UnwindSafe`]: http://doc.rust-lang.org/nightly/std/panic/trait.UnwindSafe.html
1312[`std::panic::catch_unwind`]: http://doc.rust-lang.org/nightly/std/panic/fn.catch_unwind.html
1313[`std::panic::resume_unwind`]: http://doc.rust-lang.org/nightly/std/panic/fn.resume_unwind.html
1314[`std::panic`]: http://doc.rust-lang.org/nightly/std/panic/index.html
1315[`str::is_char_boundary`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.is_char_boundary
1316
1317
7453a54e
SL
1318Version 1.8.0 (2016-04-14)
1319==========================
1320
1321Language
1322--------
1323
1324* Rust supports overloading of compound assignment statements like
1325 `+=` by implementing the [`AddAssign`], [`SubAssign`],
1326 [`MulAssign`], [`DivAssign`], [`RemAssign`], [`BitAndAssign`],
1327 [`BitOrAssign`], [`BitXorAssign`], [`ShlAssign`], or [`ShrAssign`]
1328 traits. [RFC 953].
1329* Empty structs can be defined with braces, as in `struct Foo { }`, in
1330 addition to the non-braced form, `struct Foo;`. [RFC 218].
1331
1332Libraries
1333---------
1334
1335* Stabilized APIs:
1336 * [`str::encode_utf16`][] (renamed from `utf16_units`)
1337 * [`str::EncodeUtf16`][] (renamed from `Utf16Units`)
1338 * [`Ref::map`]
1339 * [`RefMut::map`]
1340 * [`ptr::drop_in_place`]
1341 * [`time::Instant`]
1342 * [`time::SystemTime`]
1343 * [`Instant::now`]
1344 * [`Instant::duration_since`][] (renamed from `duration_from_earlier`)
1345 * [`Instant::elapsed`]
1346 * [`SystemTime::now`]
1347 * [`SystemTime::duration_since`][] (renamed from `duration_from_earlier`)
1348 * [`SystemTime::elapsed`]
1349 * Various `Add`/`Sub` impls for `Time` and `SystemTime`
1350 * [`SystemTimeError`]
1351 * [`SystemTimeError::duration`]
1352 * Various impls for `SystemTimeError`
1353 * [`UNIX_EPOCH`]
1354 * [`AddAssign`], [`SubAssign`], [`MulAssign`], [`DivAssign`],
1355 [`RemAssign`], [`BitAndAssign`], [`BitOrAssign`],
1356 [`BitXorAssign`], [`ShlAssign`], [`ShrAssign`].
1357* [The `write!` and `writeln!` macros correctly emit errors if any of
1358 their arguments can't be formatted][1.8w].
1359* [Various I/O functions support large files on 32-bit Linux][1.8l].
1360* [The Unix-specific `raw` modules, which contain a number of
1361 redefined C types are deprecated][1.8r], including `os::raw::unix`,
1362 `os::raw::macos`, and `os::raw::linux`. These modules defined types
1363 such as `ino_t` and `dev_t`. The inconsistency of these definitions
1364 across platforms was making it difficult to implement `std`
1365 correctly. Those that need these definitions should use the `libc`
1366 crate. [RFC 1415].
1367* The Unix-specific `MetadataExt` traits, including
1368 `os::unix::fs::MetadataExt`, which expose values such as inode
1369 numbers [no longer return platform-specific types][1.8r], but
1370 instead return widened integers. [RFC 1415].
1371* [`btree_set::{IntoIter, Iter, Range}` are covariant][1.8cv].
1372* [Atomic loads and stores are not volatile][1.8a].
1373* [All types in `sync::mpsc` implement `fmt::Debug`][1.8mp].
1374
1375Performance
1376-----------
1377
1378* [Inlining hash functions lead to a 3% compile-time improvement in
1379 some workloads][1.8h].
1380* When using jemalloc, its symbols are [unprefixed so that it
1381 overrides the libc malloc implementation][1.8h]. This means that for
1382 rustc, LLVM is now using jemalloc, which results in a 6%
1383 compile-time improvement on a specific workload.
1384* [Avoid quadratic growth in function size due to cleanups][1.8cu].
1385
1386Misc
1387----
1388
1389* [32-bit MSVC builds finally implement unwinding][1.8ms].
1390 i686-pc-windows-msvc is now considered a tier-1 platform.
1391* [The `--print targets` flag prints a list of supported targets][1.8t].
1392* [The `--print cfg` flag prints the `cfg`s defined for the current
1393 target][1.8cf].
1394* [`rustc` can be built with an new Cargo-based build system, written
1395 in Rust][1.8b]. It will eventually replace Rust's Makefile-based
1396 build system. To enable it configure with `configure --rustbuild`.
1397* [Errors for non-exhaustive `match` patterns now list up to 3 missing
1398 variants while also indicating the total number of missing variants
1399 if more than 3][1.8m].
1400* [Executable stacks are disabled on Linux and BSD][1.8nx].
1401* The Rust Project now publishes binary releases of the standard
1402 library for a number of tier-2 targets:
1403 `armv7-unknown-linux-gnueabihf`, `powerpc-unknown-linux-gnu`,
1404 `powerpc64-unknown-linux-gnu`, `powerpc64le-unknown-linux-gnu`
1405 `x86_64-rumprun-netbsd`. These can be installed with
1406 tools such as [multirust][1.8mr].
1407
1408Cargo
1409-----
1410
1411* [`cargo init` creates a new Cargo project in the current
1412 directory][1.8ci]. It is otherwise like `cargo new`.
1413* [Cargo has configuration keys for `-v` and
1414 `--color`][1.8cc]. `verbose` and `color`, respectively, go in the
1415 `[term]` section of `.cargo/config`.
1416* [Configuration keys that evaluate to strings or integers can be set
1417 via environment variables][1.8ce]. For example the `build.jobs` key
1418 can be set via `CARGO_BUILD_JOBS`. Environment variables take
1419 precedence over config files.
1420* [Target-specific dependencies support Rust `cfg` syntax for
1421 describing targets][1.8cfg] so that dependencies for multiple
1422 targets can be specified together. [RFC 1361].
1423* [The environment variables `CARGO_TARGET_ROOT`, `RUSTC`, and
1424 `RUSTDOC` take precedence over the `build.target-dir`,
1425 `build.rustc`, and `build.rustdoc` configuration values][1.8cv].
1426* [The child process tree is killed on Windows when Cargo is
1427 killed][1.8ck].
1428* [The `build.target` configuration value sets the target platform,
1429 like `--target`][1.8ct].
1430
1431Compatibility Notes
1432-------------------
1433
1434* [Unstable compiler flags have been further restricted][1.8u]. Since
1435 1.0 `-Z` flags have been considered unstable, and other flags that
1436 were considered unstable additionally required passing `-Z
1437 unstable-options` to access. Unlike unstable language and library
1438 features though, these options have been accessible on the stable
1439 release channel. Going forward, *new unstable flags will not be
1440 available on the stable release channel*, and old unstable flags
1441 will warn about their usage. In the future, all unstable flags will
1442 be unavailable on the stable release channel.
1443* [It is no longer possible to `match` on empty enum variants using
1444 the `Variant(..)` syntax][1.8v]. This has been a warning since 1.6.
1445* The Unix-specific `MetadataExt` traits, including
1446 `os::unix::fs::MetadataExt`, which expose values such as inode
1447 numbers [no longer return platform-specific types][1.8r], but
1448 instead return widened integers. [RFC 1415].
1449* [Modules sourced from the filesystem cannot appear within arbitrary
a7813a04 1450 blocks, but only within other modules][1.8mf].
7453a54e
SL
1451* [`--cfg` compiler flags are parsed strictly as identifiers][1.8c].
1452* On Unix, [stack overflow triggers a runtime abort instead of a
1453 SIGSEGV][1.8so].
1454* [`Command::spawn` and its equivalents return an error if any of
1455 its command-line arguments contain interior `NUL`s][1.8n].
1456* [Tuple and unit enum variants from other crates are in the type
1457 namespace][1.8tn].
1458* [On Windows `rustc` emits `.lib` files for the `staticlib` library
1459 type instead of `.a` files][1.8st]. Additionally, for the MSVC
1460 toolchain, `rustc` emits import libraries named `foo.dll.lib`
1461 instead of `foo.lib`.
1462
1463
1464[1.8a]: https://github.com/rust-lang/rust/pull/30962
1465[1.8b]: https://github.com/rust-lang/rust/pull/31123
1466[1.8c]: https://github.com/rust-lang/rust/pull/31530
1467[1.8cc]: https://github.com/rust-lang/cargo/pull/2397
1468[1.8ce]: https://github.com/rust-lang/cargo/pull/2398
1469[1.8cf]: https://github.com/rust-lang/rust/pull/31278
1470[1.8cfg]: https://github.com/rust-lang/cargo/pull/2328
1471[1.8ci]: https://github.com/rust-lang/cargo/pull/2081
1472[1.8ck]: https://github.com/rust-lang/cargo/pull/2370
1473[1.8ct]: https://github.com/rust-lang/cargo/pull/2335
1474[1.8cu]: https://github.com/rust-lang/rust/pull/31390
1475[1.8cv]: https://github.com/rust-lang/cargo/issues/2365
1476[1.8cv]: https://github.com/rust-lang/rust/pull/30998
1477[1.8h]: https://github.com/rust-lang/rust/pull/31460
1478[1.8l]: https://github.com/rust-lang/rust/pull/31668
1479[1.8m]: https://github.com/rust-lang/rust/pull/31020
a7813a04 1480[1.8mf]: https://github.com/rust-lang/rust/pull/31534
7453a54e
SL
1481[1.8mp]: https://github.com/rust-lang/rust/pull/30894
1482[1.8mr]: https://users.rust-lang.org/t/multirust-0-8-with-cross-std-installation/4901
1483[1.8ms]: https://github.com/rust-lang/rust/pull/30448
1484[1.8n]: https://github.com/rust-lang/rust/pull/31056
1485[1.8nx]: https://github.com/rust-lang/rust/pull/30859
1486[1.8r]: https://github.com/rust-lang/rust/pull/31551
1487[1.8so]: https://github.com/rust-lang/rust/pull/31333
1488[1.8st]: https://github.com/rust-lang/rust/pull/29520
1489[1.8t]: https://github.com/rust-lang/rust/pull/31358
1490[1.8tn]: https://github.com/rust-lang/rust/pull/30882
1491[1.8u]: https://github.com/rust-lang/rust/pull/31793
1492[1.8v]: https://github.com/rust-lang/rust/pull/31757
1493[1.8w]: https://github.com/rust-lang/rust/pull/31904
1494[RFC 1361]: https://github.com/rust-lang/rfcs/blob/master/text/1361-cargo-cfg-dependencies.md
1495[RFC 1415]: https://github.com/rust-lang/rfcs/blob/master/text/1415-trim-std-os.md
1496[RFC 218]: https://github.com/rust-lang/rfcs/blob/master/text/0218-empty-struct-with-braces.md
1497[RFC 953]: https://github.com/rust-lang/rfcs/blob/master/text/0953-op-assign.md
1498[`AddAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.AddAssign.html
1499[`BitAndAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitAndAssign.html
1500[`BitOrAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitOrAssign.html
1501[`BitXorAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.BitXorAssign.html
1502[`DivAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.DivAssign.html
1503[`Instant::duration_since`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.duration_since
1504[`Instant::elapsed`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.elapsed
1505[`Instant::now`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html#method.now
1506[`MulAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.MulAssign.html
1507[`Ref::map`]: http://doc.rust-lang.org/nightly/std/cell/struct.Ref.html#method.map
1508[`RefMut::map`]: http://doc.rust-lang.org/nightly/std/cell/struct.RefMut.html#method.map
1509[`RemAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.RemAssign.html
1510[`ShlAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.ShlAssign.html
1511[`ShrAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.ShrAssign.html
1512[`SubAssign`]: http://doc.rust-lang.org/nightly/std/ops/trait.SubAssign.html
1513[`SystemTime::duration_since`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.duration_since
1514[`SystemTime::elapsed`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.elapsed
1515[`SystemTime::now`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html#method.now
1516[`SystemTimeError::duration`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTimeError.html#method.duration
1517[`SystemTimeError`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTimeError.html
1518[`UNIX_EPOCH`]: http://doc.rust-lang.org/nightly/std/time/constant.UNIX_EPOCH.html
1519[`ptr::drop_in_place`]: http://doc.rust-lang.org/nightly/std/ptr/fn.drop_in_place.html
1520[`str::EncodeUtf16`]: http://doc.rust-lang.org/nightly/std/str/struct.EncodeUtf16.html
1521[`str::encode_utf16`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.encode_utf16
1522[`time::Instant`]: http://doc.rust-lang.org/nightly/std/time/struct.Instant.html
1523[`time::SystemTime`]: http://doc.rust-lang.org/nightly/std/time/struct.SystemTime.html
1524
1525
9cc50fc6
SL
1526Version 1.7.0 (2016-03-03)
1527==========================
1528
1529Libraries
1530---------
1531
1532* Stabilized APIs
1533 * `Path`
1534 * [`Path::strip_prefix`][] (renamed from relative_from)
1535 * [`path::StripPrefixError`][] (new error type returned from strip_prefix)
1536 * `Ipv4Addr`
1537 * [`Ipv4Addr::is_loopback`]
1538 * [`Ipv4Addr::is_private`]
1539 * [`Ipv4Addr::is_link_local`]
1540 * [`Ipv4Addr::is_multicast`]
1541 * [`Ipv4Addr::is_broadcast`]
1542 * [`Ipv4Addr::is_documentation`]
1543 * `Ipv6Addr`
1544 * [`Ipv6Addr::is_unspecified`]
1545 * [`Ipv6Addr::is_loopback`]
1546 * [`Ipv6Addr::is_multicast`]
1547 * `Vec`
1548 * [`Vec::as_slice`]
1549 * [`Vec::as_mut_slice`]
1550 * `String`
1551 * [`String::as_str`]
1552 * [`String::as_mut_str`]
1553 * Slices
1554 * `<[T]>::`[`clone_from_slice`], which now requires the two slices to
1555 be the same length
1556 * `<[T]>::`[`sort_by_key`]
1557 * checked, saturated, and overflowing operations
1558 * [`i32::checked_rem`], [`i32::checked_neg`], [`i32::checked_shl`], [`i32::checked_shr`]
1559 * [`i32::saturating_mul`]
1560 * [`i32::overflowing_add`], [`i32::overflowing_sub`], [`i32::overflowing_mul`], [`i32::overflowing_div`]
1561 * [`i32::overflowing_rem`], [`i32::overflowing_neg`], [`i32::overflowing_shl`], [`i32::overflowing_shr`]
1562 * [`u32::checked_rem`], [`u32::checked_neg`], [`u32::checked_shl`], [`u32::checked_shl`]
1563 * [`u32::saturating_mul`]
1564 * [`u32::overflowing_add`], [`u32::overflowing_sub`], [`u32::overflowing_mul`], [`u32::overflowing_div`]
1565 * [`u32::overflowing_rem`], [`u32::overflowing_neg`], [`u32::overflowing_shl`], [`u32::overflowing_shr`]
1566 * and checked, saturated, and overflowing operations for other primitive types
1567 * FFI
1568 * [`ffi::IntoStringError`]
1569 * [`CString::into_string`]
1570 * [`CString::into_bytes`]
1571 * [`CString::into_bytes_with_nul`]
1572 * `From<CString> for Vec<u8>`
1573 * `IntoStringError`
1574 * [`IntoStringError::into_cstring`]
1575 * [`IntoStringError::utf8_error`]
1576 * `Error for IntoStringError`
54a0048b
SL
1577 * Hashing
1578 * [`std::hash::BuildHasher`]
1579 * [`BuildHasher::Hasher`]
1580 * [`BuildHasher::build_hasher`]
1581 * [`std::hash::BuildHasherDefault`]
1582 * [`HashMap::with_hasher`]
1583 * [`HashMap::with_capacity_and_hasher`]
1584 * [`HashSet::with_hasher`]
1585 * [`HashSet::with_capacity_and_hasher`]
1586 * [`std::collections::hash_map::RandomState`]
1587 * [`RandomState::new`]
9cc50fc6
SL
1588* [Validating UTF-8 is faster by a factor of between 7 and 14x for
1589 ASCII input][1.7utf8]. This means that creating `String`s and `str`s
1590 from bytes is faster.
1591* [The performance of `LineWriter` (and thus `io::stdout`) was
1592 improved by using `memchr` to search for newlines][1.7m].
1593* [`f32::to_degrees` and `f32::to_radians` are stable][1.7f]. The
1594 `f64` variants were stabilized previously.
1595* [`BTreeMap` was rewritten to use less memory and improve the performance
1596 of insertion and iteration, the latter by as much as 5x][1.7bm].
1597* [`BTreeSet` and its iterators, `Iter`, `IntoIter`, and `Range` are
1598 covariant over their contained type][1.7bt].
1599* [`LinkedList` and its iterators, `Iter` and `IntoIter` are covariant
1600 over their contained type][1.7ll].
1601* [`str::replace` now accepts a `Pattern`][1.7rp], like other string
1602 searching methods.
1603* [`Any` is implemented for unsized types][1.7a].
1604* [`Hash` is implemented for `Duration`][1.7h].
1605
1606Misc
1607----
1608
1609* [When running tests with `--test`, rustdoc will pass `--cfg`
1610 arguments to the compiler][1.7dt].
1611* [The compiler is built with RPATH information by default][1.7rpa].
1612 This means that it will be possible to run `rustc` when installed in
1613 unusual configurations without configuring the dynamic linker search
1614 path explicitly.
1615* [`rustc` passes `--enable-new-dtags` to GNU ld][1.7dta]. This makes
1616 any RPATH entries (emitted with `-C rpath`) *not* take precedence
1617 over `LD_LIBRARY_PATH`.
1618
1619Cargo
1620-----
1621
1622* [`cargo rustc` accepts a `--profile` flag that runs `rustc` under
1623 any of the compilation profiles, 'dev', 'bench', or 'test'][1.7cp].
1624* [The `rerun-if-changed` build script directive no longer causes the
1625 build script to incorrectly run twice in certain scenarios][1.7rr].
1626
1627Compatibility Notes
1628-------------------
1629
54a0048b
SL
1630* Soundness fixes to the interactions between associated types and
1631 lifetimes, specified in [RFC 1214], [now generate errors][1.7sf] for
1632 code that violates the new rules. This is a significant change that
1633 is known to break existing code, so it has emitted warnings for the
1634 new error cases since 1.4 to give crate authors time to adapt. The
1635 details of what is changing are subtle; read the RFC for more.
9cc50fc6
SL
1636* [Several bugs in the compiler's visibility calculations were
1637 fixed][1.7v]. Since this was found to break significant amounts of
1638 code, the new errors will be emitted as warnings for several release
1639 cycles, under the `private_in_public` lint.
1640* Defaulted type parameters were accidentally accepted in positions
1641 that were not intended. In this release, [defaulted type parameters
1642 appearing outside of type definitions will generate a
1643 warning][1.7d], which will become an error in future releases.
54a0048b
SL
1644* [Parsing "." as a float results in an error instead of 0][1.7p].
1645 That is, `".".parse::<f32>()` returns `Err`, not `Ok(0.0)`.
9cc50fc6
SL
1646* [Borrows of closure parameters may not outlive the closure][1.7bc].
1647
1648[1.7a]: https://github.com/rust-lang/rust/pull/30928
1649[1.7bc]: https://github.com/rust-lang/rust/pull/30341
1650[1.7bm]: https://github.com/rust-lang/rust/pull/30426
1651[1.7bt]: https://github.com/rust-lang/rust/pull/30998
1652[1.7cp]: https://github.com/rust-lang/cargo/pull/2224
1653[1.7d]: https://github.com/rust-lang/rust/pull/30724
1654[1.7dt]: https://github.com/rust-lang/rust/pull/30372
1655[1.7dta]: https://github.com/rust-lang/rust/pull/30394
1656[1.7f]: https://github.com/rust-lang/rust/pull/30672
1657[1.7h]: https://github.com/rust-lang/rust/pull/30818
1658[1.7ll]: https://github.com/rust-lang/rust/pull/30663
1659[1.7m]: https://github.com/rust-lang/rust/pull/30381
1660[1.7p]: https://github.com/rust-lang/rust/pull/30681
1661[1.7rp]: https://github.com/rust-lang/rust/pull/29498
1662[1.7rpa]: https://github.com/rust-lang/rust/pull/30353
1663[1.7rr]: https://github.com/rust-lang/cargo/pull/2279
1664[1.7sf]: https://github.com/rust-lang/rust/pull/30389
1665[1.7utf8]: https://github.com/rust-lang/rust/pull/30740
1666[1.7v]: https://github.com/rust-lang/rust/pull/29973
1667[RFC 1214]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
54a0048b
SL
1668[`BuildHasher::Hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hasher.html
1669[`BuildHasher::build_hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.BuildHasher.html#tymethod.build_hasher
9cc50fc6
SL
1670[`CString::into_bytes_with_nul`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_bytes_with_nul
1671[`CString::into_bytes`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_bytes
1672[`CString::into_string`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_string
54a0048b
SL
1673[`HashMap::with_capacity_and_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.with_capacity_and_hasher
1674[`HashMap::with_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashMap.html#method.with_hasher
1675[`HashSet::with_capacity_and_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.with_capacity_and_hasher
1676[`HashSet::with_hasher`]: http://doc.rust-lang.org/nightly/std/collections/struct.HashSet.html#method.with_hasher
9cc50fc6
SL
1677[`IntoStringError::into_cstring`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html#method.into_cstring
1678[`IntoStringError::utf8_error`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html#method.utf8_error
1679[`Ipv4Addr::is_broadcast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_broadcast
1680[`Ipv4Addr::is_documentation`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_documentation
1681[`Ipv4Addr::is_link_local`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_link_local
1682[`Ipv4Addr::is_loopback`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_loopback
1683[`Ipv4Addr::is_multicast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_multicast
1684[`Ipv4Addr::is_private`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#method.is_private
1685[`Ipv6Addr::is_loopback`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_loopback
1686[`Ipv6Addr::is_multicast`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_multicast
1687[`Ipv6Addr::is_unspecified`]: http://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#method.is_unspecified
1688[`Path::strip_prefix`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.strip_prefix
54a0048b 1689[`RandomState::new`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html#method.new
9cc50fc6
SL
1690[`String::as_mut_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_mut_str
1691[`String::as_str`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.as_str
1692[`Vec::as_mut_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_mut_slice
1693[`Vec::as_slice`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.as_slice
54a0048b 1694[`clone_from_slice`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.clone_from_slice
9cc50fc6
SL
1695[`ffi::IntoStringError`]: http://doc.rust-lang.org/nightly/std/ffi/struct.IntoStringError.html
1696[`i32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_neg
1697[`i32::checked_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_rem
1698[`i32::checked_shl`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_shl
1699[`i32::checked_shr`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.checked_shr
1700[`i32::overflowing_add`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_add
1701[`i32::overflowing_div`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_div
1702[`i32::overflowing_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_mul
1703[`i32::overflowing_neg`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_neg
1704[`i32::overflowing_rem`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_rem
1705[`i32::overflowing_shl`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_shl
1706[`i32::overflowing_shr`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_shr
1707[`i32::overflowing_sub`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.overflowing_sub
1708[`i32::saturating_mul`]: http://doc.rust-lang.org/nightly/std/primitive.i32.html#method.saturating_mul
1709[`path::StripPrefixError`]: http://doc.rust-lang.org/nightly/std/path/struct.StripPrefixError.html
54a0048b
SL
1710[`sort_by_key`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.sort_by_key
1711[`std::collections::hash_map::RandomState`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.RandomState.html
1712[`std::hash::BuildHasherDefault`]: http://doc.rust-lang.org/nightly/std/hash/struct.BuildHasherDefault.html
1713[`std::hash::BuildHasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.BuildHasher.html
9cc50fc6
SL
1714[`u32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_neg
1715[`u32::checked_rem`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_rem
54a0048b 1716[`u32::checked_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_neg
9cc50fc6
SL
1717[`u32::checked_shl`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.checked_shl
1718[`u32::overflowing_add`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_add
1719[`u32::overflowing_div`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_div
1720[`u32::overflowing_mul`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_mul
1721[`u32::overflowing_neg`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_neg
1722[`u32::overflowing_rem`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_rem
1723[`u32::overflowing_shl`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_shl
1724[`u32::overflowing_shr`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_shr
1725[`u32::overflowing_sub`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.overflowing_sub
1726[`u32::saturating_mul`]: http://doc.rust-lang.org/nightly/std/primitive.u32.html#method.saturating_mul
1727
1728
92a42be0
SL
1729Version 1.6.0 (2016-01-21)
1730==========================
1731
1732Language
1733--------
1734
1735* The `#![no_std]` attribute causes a crate to not be linked to the
1736 standard library, but only the [core library][1.6co], as described
1737 in [RFC 1184]. The core library defines common types and traits but
1738 has no platform dependencies whatsoever, and is the basis for Rust
1739 software in environments that cannot support a full port of the
1740 standard library, such as operating systems. Most of the core
1741 library is now stable.
1742
1743Libraries
1744---------
1745
1746* Stabilized APIs:
9cc50fc6
SL
1747 [`Read::read_exact`],
1748 [`ErrorKind::UnexpectedEof`][] (renamed from `UnexpectedEOF`),
1749 [`fs::DirBuilder`], [`fs::DirBuilder::new`],
92a42be0
SL
1750 [`fs::DirBuilder::recursive`], [`fs::DirBuilder::create`],
1751 [`os::unix::fs::DirBuilderExt`],
1752 [`os::unix::fs::DirBuilderExt::mode`], [`vec::Drain`],
1753 [`vec::Vec::drain`], [`string::Drain`], [`string::String::drain`],
1754 [`vec_deque::Drain`], [`vec_deque::VecDeque::drain`],
1755 [`collections::hash_map::Drain`],
1756 [`collections::hash_map::HashMap::drain`],
1757 [`collections::hash_set::Drain`],
1758 [`collections::hash_set::HashSet::drain`],
1759 [`collections::binary_heap::Drain`],
1760 [`collections::binary_heap::BinaryHeap::drain`],
9cc50fc6 1761 [`Vec::extend_from_slice`][] (renamed from `push_all`),
92a42be0 1762 [`Mutex::get_mut`], [`Mutex::into_inner`], [`RwLock::get_mut`],
9cc50fc6
SL
1763 [`RwLock::into_inner`],
1764 [`Iterator::min_by_key`][] (renamed from `min_by`),
1765 [`Iterator::max_by_key`][] (renamed from `max_by`).
92a42be0
SL
1766* The [core library][1.6co] is stable, as are most of its APIs.
1767* [The `assert_eq!` macro supports arguments that don't implement
1768 `Sized`][1.6ae], such as arrays. In this way it behaves more like
1769 `assert!`.
1770* Several timer functions that take duration in milliseconds [are
1771 deprecated in favor of those that take `Duration`][1.6ms]. These
1772 include `Condvar::wait_timeout_ms`, `thread::sleep_ms`, and
9cc50fc6 1773 `thread::park_timeout_ms`.
92a42be0
SL
1774* The algorithm by which `Vec` reserves additional elements was
1775 [tweaked to not allocate excessive space][1.6a] while still growing
1776 exponentially.
1777* `From` conversions are [implemented from integers to floats][1.6f]
1778 in cases where the conversion is lossless. Thus they are not
1779 implemented for 32-bit ints to `f32`, nor for 64-bit ints to `f32`
1780 or `f64`. They are also not implemented for `isize` and `usize`
1781 because the implementations would be platform-specific. `From` is
1782 also implemented from `f32` to `f64`.
1783* `From<&Path>` and `From<PathBuf>` are implemented for `Cow<Path>`.
1784* `From<T>` is implemented for `Box<T>`, `Rc<T>` and `Arc<T>`.
1785* `IntoIterator` is implemented for `&PathBuf` and `&Path`.
1786* [`BinaryHeap` was refactored][1.6bh] for modest performance
1787 improvements.
1788* Sorting slices that are already sorted [is 50% faster in some
1789 cases][1.6s].
1790
1791Cargo
1792-----
1793
1794* Cargo will look in `$CARGO_HOME/bin` for subcommands [by default][1.6c].
1795* Cargo build scripts can specify their dependencies by emitting the
1796 [`rerun-if-changed`][1.6rr] key.
1797* crates.io will reject publication of crates with dependencies that
1798 have a wildcard version constraint. Crates with wildcard
1799 dependencies were seen to cause a variety of problems, as described
9cc50fc6
SL
1800 in [RFC 1241]. Since 1.5 publication of such crates has emitted a
1801 warning.
92a42be0
SL
1802* `cargo clean` [accepts a `--release` flag][1.6cc] to clean the
1803 release folder. A variety of artifacts that Cargo failed to clean
1804 are now correctly deleted.
1805
1806Misc
1807----
1808
1809* The `unreachable_code` lint [warns when a function call's argument
1810 diverges][1.6dv].
1811* The parser indicates [failures that may be caused by
1812 confusingly-similar Unicode characters][1.6uc]
1813* Certain macro errors [are reported at definition time][1.6m], not
1814 expansion.
1815
1816Compatibility Notes
1817-------------------
1818
1819* The compiler no longer makes use of the [`RUST_PATH`][1.6rp]
1820 environment variable when locating crates. This was a pre-cargo
1821 feature for integrating with the package manager that was
1822 accidentally never removed.
1823* [A number of bugs were fixed in the privacy checker][1.6p] that
1824 could cause previously-accepted code to break.
1825* [Modules and unit/tuple structs may not share the same name][1.6ts].
9cc50fc6
SL
1826* [Bugs in pattern matching unit structs were fixed][1.6us]. The tuple
1827 struct pattern syntax (`Foo(..)`) can no longer be used to match
1828 unit structs. This is a warning now, but will become an error in
1829 future releases. Patterns that share the same name as a const are
1830 now an error.
92a42be0
SL
1831* A bug was fixed that causes [rustc not to apply default type
1832 parameters][1.6xc] when resolving certain method implementations of
1833 traits defined in other crates.
1834
1835[1.6a]: https://github.com/rust-lang/rust/pull/29454
1836[1.6ae]: https://github.com/rust-lang/rust/pull/29770
1837[1.6bh]: https://github.com/rust-lang/rust/pull/29811
1838[1.6c]: https://github.com/rust-lang/cargo/pull/2192
1839[1.6cc]: https://github.com/rust-lang/cargo/pull/2131
1840[1.6co]: http://doc.rust-lang.org/beta/core/index.html
1841[1.6dv]: https://github.com/rust-lang/rust/pull/30000
1842[1.6f]: https://github.com/rust-lang/rust/pull/29129
1843[1.6m]: https://github.com/rust-lang/rust/pull/29828
1844[1.6ms]: https://github.com/rust-lang/rust/pull/29604
1845[1.6p]: https://github.com/rust-lang/rust/pull/29726
1846[1.6rp]: https://github.com/rust-lang/rust/pull/30034
1847[1.6rr]: https://github.com/rust-lang/cargo/pull/2134
1848[1.6s]: https://github.com/rust-lang/rust/pull/29675
1849[1.6ts]: https://github.com/rust-lang/rust/issues/21546
1850[1.6uc]: https://github.com/rust-lang/rust/pull/29837
1851[1.6us]: https://github.com/rust-lang/rust/pull/29383
1852[1.6xc]: https://github.com/rust-lang/rust/issues/30123
1853[RFC 1184]: https://github.com/rust-lang/rfcs/blob/master/text/1184-stabilize-no_std.md
1854[RFC 1241]: https://github.com/rust-lang/rfcs/blob/master/text/1241-no-wildcard-deps.md
1855[`ErrorKind::UnexpectedEof`]: http://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html#variant.UnexpectedEof
1856[`Iterator::max_by_key`]: http://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.max_by_key
1857[`Iterator::min_by_key`]: http://doc.rust-lang.org/nightly/std/iter/trait.Iterator.html#method.min_by_key
1858[`Mutex::get_mut`]: http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html#method.get_mut
1859[`Mutex::into_inner`]: http://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html#method.into_inner
1860[`Read::read_exact`]: http://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_exact
1861[`RwLock::get_mut`]: http://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html#method.get_mut
1862[`RwLock::into_inner`]: http://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html#method.into_inner
1863[`Vec::extend_from_slice`]: http://doc.rust-lang.org/nightly/collections/vec/struct.Vec.html#method.extend_from_slice
1864[`collections::binary_heap::BinaryHeap::drain`]: http://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.BinaryHeap.html#method.drain
1865[`collections::binary_heap::Drain`]: http://doc.rust-lang.org/nightly/std/collections/binary_heap/struct.Drain.html
1866[`collections::hash_map::Drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.Drain.html
1867[`collections::hash_map::HashMap::drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_map/struct.HashMap.html#method.drain
1868[`collections::hash_set::Drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_set/struct.Drain.html
1869[`collections::hash_set::HashSet::drain`]: http://doc.rust-lang.org/nightly/std/collections/hash_set/struct.HashSet.html#method.drain
1870[`fs::DirBuilder::create`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.create
1871[`fs::DirBuilder::new`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.new
1872[`fs::DirBuilder::recursive`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html#method.recursive
1873[`fs::DirBuilder`]: http://doc.rust-lang.org/nightly/std/fs/struct.DirBuilder.html
1874[`os::unix::fs::DirBuilderExt::mode`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html#tymethod.mode
1875[`os::unix::fs::DirBuilderExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.DirBuilderExt.html
1876[`string::Drain`]: http://doc.rust-lang.org/nightly/std/string/struct.Drain.html
1877[`string::String::drain`]: http://doc.rust-lang.org/nightly/std/string/struct.String.html#method.drain
1878[`vec::Drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Drain.html
1879[`vec::Vec::drain`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.drain
1880[`vec_deque::Drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.Drain.html
1881[`vec_deque::VecDeque::drain`]: http://doc.rust-lang.org/nightly/std/collections/vec_deque/struct.VecDeque.html#method.drain
1882
1883
b039eaaf
SL
1884Version 1.5.0 (2015-12-10)
1885==========================
1886
1887* ~700 changes, numerous bugfixes
1888
1889Highlights
1890----------
1891
1892* Stabilized APIs:
1893 [`BinaryHeap::from`], [`BinaryHeap::into_sorted_vec`],
1894 [`BinaryHeap::into_vec`], [`Condvar::wait_timeout`],
1895 [`FileTypeExt::is_block_device`], [`FileTypeExt::is_char_device`],
1896 [`FileTypeExt::is_fifo`], [`FileTypeExt::is_socket`],
1897 [`FileTypeExt`], [`Formatter::alternate`], [`Formatter::fill`],
1898 [`Formatter::precision`], [`Formatter::sign_aware_zero_pad`],
1899 [`Formatter::sign_minus`], [`Formatter::sign_plus`],
1900 [`Formatter::width`], [`Iterator::cmp`], [`Iterator::eq`],
1901 [`Iterator::ge`], [`Iterator::gt`], [`Iterator::le`],
1902 [`Iterator::lt`], [`Iterator::ne`], [`Iterator::partial_cmp`],
1903 [`Path::canonicalize`], [`Path::exists`], [`Path::is_dir`],
1904 [`Path::is_file`], [`Path::metadata`], [`Path::read_dir`],
1905 [`Path::read_link`], [`Path::symlink_metadata`],
1906 [`Utf8Error::valid_up_to`], [`Vec::resize`],
1907 [`VecDeque::as_mut_slices`], [`VecDeque::as_slices`],
1908 [`VecDeque::insert`], [`VecDeque::shrink_to_fit`],
1909 [`VecDeque::swap_remove_back`], [`VecDeque::swap_remove_front`],
1910 [`slice::split_first_mut`], [`slice::split_first`],
1911 [`slice::split_last_mut`], [`slice::split_last`],
1912 [`char::from_u32_unchecked`], [`fs::canonicalize`],
1913 [`str::MatchIndices`], [`str::RMatchIndices`],
1914 [`str::match_indices`], [`str::rmatch_indices`],
1915 [`str::slice_mut_unchecked`], [`string::ParseError`].
1916* Rust applications hosted on crates.io can be installed locally to
1917 `~/.cargo/bin` with the [`cargo install`] command. Among other
1918 things this makes it easier to augment Cargo with new subcommands:
1919 when a binary named e.g. `cargo-foo` is found in `$PATH` it can be
1920 invoked as `cargo foo`.
1921* Crates with wildcard (`*`) dependencies will [emit warnings when
1922 published][1.5w]. In 1.6 it will no longer be possible to publish
1923 crates with wildcard dependencies.
1924
1925Breaking Changes
1926----------------
1927
1928* The rules determining when a particular lifetime must outlive
1929 a particular value (known as '[dropck]') have been [modified
1930 to not rely on parametricity][1.5p].
1931* [Implementations of `AsRef` and `AsMut` were added to `Box`, `Rc`,
1932 and `Arc`][1.5a]. Because these smart pointer types implement
1933 `Deref`, this causes breakage in cases where the interior type
1934 contains methods of the same name.
1935* [Correct a bug in Rc/Arc][1.5c] that caused [dropck] to be unaware
1936 that they could drop their content. Soundness fix.
1937* All method invocations are [properly checked][1.5wf1] for
1938 [well-formedness][1.5wf2]. Soundness fix.
1939* Traits whose supertraits contain `Self` are [not object
1940 safe][1.5o]. Soundness fix.
1941* Target specifications support a [`no_default_libraries`][1.5nd]
1942 setting that controls whether `-nodefaultlibs` is passed to the
1943 linker, and in turn the `is_like_windows` setting no longer affects
1944 the `-nodefaultlibs` flag.
1945* `#[derive(Show)]`, long-deprecated, [has been removed][1.5ds].
1946* The `#[inline]` and `#[repr]` attributes [can only appear
1947 in valid locations][1.5at].
1948* Native libraries linked from the local crate are [passed to
1949 the linker before native libraries from upstream crates][1.5nl].
1950* Two rarely-used attributes, `#[no_debug]` and
1951 `#[omit_gdb_pretty_printer_section]` [are feature gated][1.5fg].
1952* Negation of unsigned integers, which has been a warning for
1953 several releases, [is now behind a feature gate and will
1954 generate errors][1.5nu].
1955* The parser accidentally accepted visibility modifiers on
1956 enum variants, a bug [which has been fixed][1.5ev].
1957* [A bug was fixed that allowed `use` statements to import unstable
1958 features][1.5use].
1959
1960Language
1961--------
1962
1963* When evaluating expressions at compile-time that are not
1964 compile-time constants (const-evaluating expressions in non-const
1965 contexts), incorrect code such as overlong bitshifts and arithmetic
1966 overflow will [generate a warning instead of an error][1.5ce],
1967 delaying the error until runtime. This will allow the
1968 const-evaluator to be expanded in the future backwards-compatibly.
1969* The `improper_ctypes` lint [no longer warns about using `isize` and
1970 `usize` in FFI][1.5ict].
1971
1972Libraries
1973---------
1974
1975* `Arc<T>` and `Rc<T>` are [covariant with respect to `T` instead of
1976 invariant][1.5c].
1977* `Default` is [implemented for mutable slices][1.5d].
1978* `FromStr` is [implemented for `SockAddrV4` and `SockAddrV6`][1.5s].
1979* There are now `From` conversions [between floating point
1980 types][1.5f] where the conversions are lossless.
1981* Thera are now `From` conversions [between integer types][1.5i] where
1982 the conversions are lossless.
1983* [`fs::Metadata` implements `Clone`][1.5fs].
1984* The `parse` method [accepts a leading "+" when parsing
1985 integers][1.5pi].
1986* [`AsMut` is implemented for `Vec`][1.5am].
1987* The `clone_from` implementations for `String` and `BinaryHeap` [have
1988 been optimized][1.5cf] and no longer rely on the default impl.
1989* The `extern "Rust"`, `extern "C"`, `unsafe extern "Rust"` and
1990 `unsafe extern "C"` function types now [implement `Clone`,
1991 `PartialEq`, `Eq`, `PartialOrd`, `Ord`, `Hash`, `fmt::Pointer`, and
1992 `fmt::Debug` for up to 12 arguments][1.5fp].
1993* [Dropping `Vec`s is much faster in unoptimized builds when the
1994 element types don't implement `Drop`][1.5dv].
1995* A bug that caused in incorrect behavior when [combining `VecDeque`
1996 with zero-sized types][1.5vdz] was resolved.
1997* [`PartialOrd` for slices is faster][1.5po].
1998
1999Miscellaneous
2000-------------
2001
2002* [Crate metadata size was reduced by 20%][1.5md].
2003* [Improvements to code generation reduced the size of libcore by 3.3
2004 MB and rustc's memory usage by 18MB][1.5m].
2005* [Improvements to deref translation increased performance in
2006 unoptimized builds][1.5dr].
2007* Various errors in trait resolution [are deduplicated to only be
2008 reported once][1.5te].
2009* Rust has preliminary [support for rumprun kernels][1.5rr].
2010* Rust has preliminary [support for NetBSD on amd64][1.5na].
2011
2012[1.5use]: https://github.com/rust-lang/rust/pull/28364
2013[1.5po]: https://github.com/rust-lang/rust/pull/28436
2014[1.5ev]: https://github.com/rust-lang/rust/pull/28442
2015[1.5nu]: https://github.com/rust-lang/rust/pull/28468
2016[1.5dr]: https://github.com/rust-lang/rust/pull/28491
2017[1.5vdz]: https://github.com/rust-lang/rust/pull/28494
2018[1.5md]: https://github.com/rust-lang/rust/pull/28521
2019[1.5fg]: https://github.com/rust-lang/rust/pull/28522
2020[1.5dv]: https://github.com/rust-lang/rust/pull/28531
2021[1.5na]: https://github.com/rust-lang/rust/pull/28543
2022[1.5fp]: https://github.com/rust-lang/rust/pull/28560
2023[1.5rr]: https://github.com/rust-lang/rust/pull/28593
2024[1.5cf]: https://github.com/rust-lang/rust/pull/28602
2025[1.5nl]: https://github.com/rust-lang/rust/pull/28605
2026[1.5te]: https://github.com/rust-lang/rust/pull/28645
2027[1.5at]: https://github.com/rust-lang/rust/pull/28650
2028[1.5am]: https://github.com/rust-lang/rust/pull/28663
2029[1.5m]: https://github.com/rust-lang/rust/pull/28778
2030[1.5ict]: https://github.com/rust-lang/rust/pull/28779
2031[1.5a]: https://github.com/rust-lang/rust/pull/28811
2032[1.5pi]: https://github.com/rust-lang/rust/pull/28826
2033[1.5ce]: https://github.com/rust-lang/rfcs/blob/master/text/1229-compile-time-asserts.md
2034[1.5p]: https://github.com/rust-lang/rfcs/blob/master/text/1238-nonparametric-dropck.md
2035[1.5i]: https://github.com/rust-lang/rust/pull/28921
2036[1.5fs]: https://github.com/rust-lang/rust/pull/29021
2037[1.5f]: https://github.com/rust-lang/rust/pull/29129
2038[1.5ds]: https://github.com/rust-lang/rust/pull/29148
2039[1.5s]: https://github.com/rust-lang/rust/pull/29190
2040[1.5d]: https://github.com/rust-lang/rust/pull/29245
2041[1.5o]: https://github.com/rust-lang/rust/pull/29259
2042[1.5nd]: https://github.com/rust-lang/rust/pull/28578
2043[1.5wf2]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
2044[1.5wf1]: https://github.com/rust-lang/rust/pull/28669
2045[dropck]: https://doc.rust-lang.org/nightly/nomicon/dropck.html
2046[1.5c]: https://github.com/rust-lang/rust/pull/29110
2047[1.5w]: https://github.com/rust-lang/rfcs/blob/master/text/1241-no-wildcard-deps.md
2048[`cargo install`]: https://github.com/rust-lang/rfcs/blob/master/text/1200-cargo-install.md
2049[`BinaryHeap::from`]: http://doc.rust-lang.org/nightly/std/convert/trait.From.html#method.from
2050[`BinaryHeap::into_sorted_vec`]: http://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html#method.into_sorted_vec
2051[`BinaryHeap::into_vec`]: http://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html#method.into_vec
2052[`Condvar::wait_timeout`]: http://doc.rust-lang.org/nightly/std/sync/struct.Condvar.html#method.wait_timeout
2053[`FileTypeExt::is_block_device`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_block_device
2054[`FileTypeExt::is_char_device`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_char_device
2055[`FileTypeExt::is_fifo`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_fifo
2056[`FileTypeExt::is_socket`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html#tymethod.is_socket
2057[`FileTypeExt`]: http://doc.rust-lang.org/nightly/std/os/unix/fs/trait.FileTypeExt.html
2058[`Formatter::alternate`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.alternate
2059[`Formatter::fill`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.fill
2060[`Formatter::precision`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.precision
2061[`Formatter::sign_aware_zero_pad`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_aware_zero_pad
2062[`Formatter::sign_minus`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_minus
2063[`Formatter::sign_plus`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.sign_plus
2064[`Formatter::width`]: http://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.width
2065[`Iterator::cmp`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.cmp
2066[`Iterator::eq`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.eq
2067[`Iterator::ge`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ge
2068[`Iterator::gt`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.gt
2069[`Iterator::le`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.le
2070[`Iterator::lt`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.lt
2071[`Iterator::ne`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.ne
2072[`Iterator::partial_cmp`]: http://doc.rust-lang.org/nightly/core/iter/trait.Iterator.html#method.partial_cmp
2073[`Path::canonicalize`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.canonicalize
2074[`Path::exists`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.exists
2075[`Path::is_dir`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.is_dir
2076[`Path::is_file`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.is_file
2077[`Path::metadata`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.metadata
2078[`Path::read_dir`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.read_dir
2079[`Path::read_link`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.read_link
2080[`Path::symlink_metadata`]: http://doc.rust-lang.org/nightly/std/path/struct.Path.html#method.symlink_metadata
2081[`Utf8Error::valid_up_to`]: http://doc.rust-lang.org/nightly/core/str/struct.Utf8Error.html#method.valid_up_to
2082[`Vec::resize`]: http://doc.rust-lang.org/nightly/std/vec/struct.Vec.html#method.resize
2083[`VecDeque::as_mut_slices`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.as_mut_slices
2084[`VecDeque::as_slices`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.as_slices
2085[`VecDeque::insert`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.insert
2086[`VecDeque::shrink_to_fit`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.shrink_to_fit
2087[`VecDeque::swap_remove_back`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.swap_remove_back
2088[`VecDeque::swap_remove_front`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.swap_remove_front
2089[`slice::split_first_mut`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_first_mut
2090[`slice::split_first`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_first
2091[`slice::split_last_mut`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_last_mut
2092[`slice::split_last`]: http://doc.rust-lang.org/nightly/std/primitive.slice.html#method.split_last
2093[`char::from_u32_unchecked`]: http://doc.rust-lang.org/nightly/std/char/fn.from_u32_unchecked.html
2094[`fs::canonicalize`]: http://doc.rust-lang.org/nightly/std/fs/fn.canonicalize.html
2095[`str::MatchIndices`]: http://doc.rust-lang.org/nightly/std/str/struct.MatchIndices.html
2096[`str::RMatchIndices`]: http://doc.rust-lang.org/nightly/std/str/struct.RMatchIndices.html
2097[`str::match_indices`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.match_indices
2098[`str::rmatch_indices`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatch_indices
2099[`str::slice_mut_unchecked`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.slice_mut_unchecked
2100[`string::ParseError`]: http://doc.rust-lang.org/nightly/std/string/enum.ParseError.html
2101
2102Version 1.4.0 (2015-10-29)
2103==========================
e9174d1e
SL
2104
2105* ~1200 changes, numerous bugfixes
2106
2107Highlights
2108----------
2109
2110* Windows builds targeting the 64-bit MSVC ABI and linker (instead of
2111 GNU) are now supported and recommended for use.
2112
2113Breaking Changes
2114----------------
2115
2116* [Several changes have been made to fix type soundness and improve
2117 the behavior of associated types][sound]. See [RFC 1214]. Although
2118 we have mostly introduced these changes as warnings this release, to
2119 become errors next release, there are still some scenarios that will
2120 see immediate breakage.
2121* [The `str::lines` and `BufRead::lines` iterators treat `\r\n` as
2122 line breaks in addition to `\n`][crlf].
2123* [Loans of `'static` lifetime extend to the end of a function][stat].
b039eaaf
SL
2124* [`str::parse` no longer introduces avoidable rounding error when
2125 parsing floating point numbers. Together with earlier changes to
2126 float formatting/output, "round trips" like f.to_string().parse()
2127 now preserve the value of f exactly. Additionally, leading plus
2128 signs are now accepted][fp3].
2129
e9174d1e
SL
2130
2131Language
2132--------
2133
2134* `use` statements that import multiple items [can now rename
2135 them][i], as in `use foo::{bar as kitten, baz as puppy}`.
2136* [Binops work correctly on fat pointers][binfat].
2137* `pub extern crate`, which does not behave as expected, [issues a
2138 warning][pec] until a better solution is found.
2139
2140Libraries
2141---------
2142
2143* [Many APIs were stabilized][stab]: `<Box<str>>::into_string`,
2144 [`Arc::downgrade`], [`Arc::get_mut`], [`Arc::make_mut`],
2145 [`Arc::try_unwrap`], [`Box::from_raw`], [`Box::into_raw`], [`CStr::to_str`],
2146 [`CStr::to_string_lossy`], [`CString::from_raw`], [`CString::into_raw`],
2147 [`IntoRawFd::into_raw_fd`], [`IntoRawFd`],
2148 `IntoRawHandle::into_raw_handle`, `IntoRawHandle`,
2149 `IntoRawSocket::into_raw_socket`, `IntoRawSocket`, [`Rc::downgrade`],
2150 [`Rc::get_mut`], [`Rc::make_mut`], [`Rc::try_unwrap`], [`Result::expect`],
2151 [`String::into_boxed_str`], [`TcpStream::read_timeout`],
2152 [`TcpStream::set_read_timeout`], [`TcpStream::set_write_timeout`],
2153 [`TcpStream::write_timeout`], [`UdpSocket::read_timeout`],
2154 [`UdpSocket::set_read_timeout`], [`UdpSocket::set_write_timeout`],
2155 [`UdpSocket::write_timeout`], `Vec::append`, `Vec::split_off`,
2156 [`VecDeque::append`], [`VecDeque::retain`], [`VecDeque::split_off`],
2157 [`rc::Weak::upgrade`], [`rc::Weak`], [`slice::Iter::as_slice`],
2158 [`slice::IterMut::into_slice`], [`str::CharIndices::as_str`],
2159 [`str::Chars::as_str`], [`str::split_at_mut`], [`str::split_at`],
2160 [`sync::Weak::upgrade`], [`sync::Weak`], [`thread::park_timeout`],
2161 [`thread::sleep`].
2162* [Some APIs were deprecated][dep]: `BTreeMap::with_b`,
2163 `BTreeSet::with_b`, `Option::as_mut_slice`, `Option::as_slice`,
2164 `Result::as_mut_slice`, `Result::as_slice`, `f32::from_str_radix`,
2165 `f64::from_str_radix`.
2166* [Reverse-searching strings is faster with the 'two-way'
2167 algorithm][s].
2168* [`std::io::copy` allows `?Sized` arguments][cc].
2169* The `Windows`, `Chunks`, and `ChunksMut` iterators over slices all
2170 [override `count`, `nth` and `last` with an O(1)
2171 implementation][it].
2172* [`Default` is implemented for arrays up to `[T; 32]`][d].
2173* [`IntoRawFd` has been added to the Unix-specific prelude,
2174 `IntoRawSocket` and `IntoRawHandle` to the Windows-specific
2175 prelude][pr].
2176* [`Extend<String>` and `FromIterator<String` are both implemented for
2177 `String`][es].
b039eaaf
SL
2178* [`IntoIterator` is implemented for references to `Option` and
2179 `Result`][into2].
e9174d1e 2180* [`HashMap` and `HashSet` implement `Extend<&T>` where `T:
b039eaaf
SL
2181 Copy`][ext] as part of [RFC 839]. This will cause type inferance
2182 breakage in rare situations.
e9174d1e
SL
2183* [`BinaryHeap` implements `Debug`][bh2].
2184* [`Borrow` and `BorrowMut` are implemented for fixed-size
2185 arrays][bm].
b039eaaf 2186* [`extern fn`s with the "Rust" and "C" ABIs implement common
e9174d1e
SL
2187 traits including `Eq`, `Ord`, `Debug`, `Hash`][fp].
2188* [String comparison is faster][faststr].
b039eaaf
SL
2189* `&mut T` where `T: std::fmt::Write` [also implements
2190 `std::fmt::Write`][mutw].
2191* [A stable regression in `VecDeque::push_back` and other
2192 capicity-altering methods that caused panics for zero-sized types
2193 was fixed][vd].
e9174d1e
SL
2194* [Function pointers implement traits for up to 12 parameters][fp2].
2195
2196Miscellaneous
2197-------------
2198
2199* The compiler [no longer uses the 'morestack' feature to prevent
2200 stack overflow][mm]. Instead it uses guard pages and stack
2201 probes (though stack probes are not yet implemented on any platform
2202 but Windows).
2203* [The compiler matches traits faster when projections are involved][p].
2204* The 'improper_ctypes' lint [no longer warns about use of `isize` and
2205 `usize`][ffi].
2206* [Cargo now displays useful information about what its doing during
2207 `cargo update`][cu].
2208
2209[`Arc::downgrade`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.downgrade
2210[`Arc::make_mut`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.make_mut
2211[`Arc::get_mut`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.get_mut
2212[`Arc::try_unwrap`]: http://doc.rust-lang.org/nightly/alloc/arc/struct.Arc.html#method.try_unwrap
2213[`Box::from_raw`]: http://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.from_raw
2214[`Box::into_raw`]: http://doc.rust-lang.org/nightly/alloc/boxed/struct.Box.html#method.into_raw
2215[`CStr::to_str`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.to_str
2216[`CStr::to_string_lossy`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html#method.to_string_lossy
2217[`CString::from_raw`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.from_raw
2218[`CString::into_raw`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html#method.into_raw
2219[`IntoRawFd::into_raw_fd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.IntoRawFd.html#tymethod.into_raw_fd
2220[`IntoRawFd`]: http://doc.rust-lang.org/nightly/std/os/unix/io/trait.IntoRawFd.html
2221[`Rc::downgrade`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.downgrade
2222[`Rc::get_mut`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.get_mut
2223[`Rc::make_mut`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.make_mut
2224[`Rc::try_unwrap`]: http://doc.rust-lang.org/nightly/alloc/rc/struct.Rc.html#method.try_unwrap
2225[`Result::expect`]: http://doc.rust-lang.org/nightly/core/result/enum.Result.html#method.expect
2226[`String::into_boxed_str`]: http://doc.rust-lang.org/nightly/collections/string/struct.String.html#method.into_boxed_str
2227[`TcpStream::read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.read_timeout
2228[`TcpStream::set_read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_read_timeout
2229[`TcpStream::write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.write_timeout
2230[`TcpStream::set_write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_write_timeout
2231[`UdpSocket::read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.read_timeout
2232[`UdpSocket::set_read_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_read_timeout
2233[`UdpSocket::write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.write_timeout
2234[`UdpSocket::set_write_timeout`]: http://doc.rust-lang.org/nightly/std/net/struct.TcpStream.html#method.set_write_timeout
2235[`VecDeque::append`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.append
2236[`VecDeque::retain`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.retain
2237[`VecDeque::split_off`]: http://doc.rust-lang.org/nightly/std/collections/struct.VecDeque.html#method.split_off
2238[`rc::Weak::upgrade`]: http://doc.rust-lang.org/nightly/std/rc/struct.Weak.html#method.upgrade
2239[`rc::Weak`]: http://doc.rust-lang.org/nightly/std/rc/struct.Weak.html
2240[`slice::Iter::as_slice`]: http://doc.rust-lang.org/nightly/std/slice/struct.Iter.html#method.as_slice
2241[`slice::IterMut::into_slice`]: http://doc.rust-lang.org/nightly/std/slice/struct.IterMut.html#method.into_slice
2242[`str::CharIndices::as_str`]: http://doc.rust-lang.org/nightly/std/str/struct.CharIndices.html#method.as_str
2243[`str::Chars::as_str`]: http://doc.rust-lang.org/nightly/std/str/struct.Chars.html#method.as_str
2244[`str::split_at_mut`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_at_mut
2245[`str::split_at`]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_at
2246[`sync::Weak::upgrade`]: http://doc.rust-lang.org/nightly/std/sync/struct.Weak.html#method.upgrade
2247[`sync::Weak`]: http://doc.rust-lang.org/nightly/std/sync/struct.Weak.html
2248[`thread::park_timeout`]: http://doc.rust-lang.org/nightly/std/thread/fn.park_timeout.html
2249[`thread::sleep`]: http://doc.rust-lang.org/nightly/std/thread/fn.sleep.html
2250[bh2]: https://github.com/rust-lang/rust/pull/28156
2251[binfat]: https://github.com/rust-lang/rust/pull/28270
2252[bm]: https://github.com/rust-lang/rust/pull/28197
2253[cc]: https://github.com/rust-lang/rust/pull/27531
2254[crlf]: https://github.com/rust-lang/rust/pull/28034
2255[cu]: https://github.com/rust-lang/cargo/pull/1931
2256[d]: https://github.com/rust-lang/rust/pull/27825
2257[dep]: https://github.com/rust-lang/rust/pull/28339
2258[es]: https://github.com/rust-lang/rust/pull/27956
2259[ext]: https://github.com/rust-lang/rust/pull/28094
2260[faststr]: https://github.com/rust-lang/rust/pull/28338
2261[ffi]: https://github.com/rust-lang/rust/pull/28779
2262[fp]: https://github.com/rust-lang/rust/pull/28268
2263[fp2]: https://github.com/rust-lang/rust/pull/28560
b039eaaf 2264[fp3]: https://github.com/rust-lang/rust/pull/27307
e9174d1e 2265[i]: https://github.com/rust-lang/rust/pull/27451
b039eaaf 2266[into2]: https://github.com/rust-lang/rust/pull/28039
e9174d1e
SL
2267[it]: https://github.com/rust-lang/rust/pull/27652
2268[mm]: https://github.com/rust-lang/rust/pull/27338
2269[mutw]: https://github.com/rust-lang/rust/pull/28368
2270[sound]: https://github.com/rust-lang/rust/pull/27641
2271[p]: https://github.com/rust-lang/rust/pull/27866
2272[pec]: https://github.com/rust-lang/rust/pull/28486
2273[pr]: https://github.com/rust-lang/rust/pull/27896
2274[RFC 839]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
2275[RFC 1214]: https://github.com/rust-lang/rfcs/blob/master/text/1214-projections-lifetimes-and-wf.md
2276[s]: https://github.com/rust-lang/rust/pull/27474
2277[stab]: https://github.com/rust-lang/rust/pull/28339
2278[stat]: https://github.com/rust-lang/rust/pull/28321
2279[vd]: https://github.com/rust-lang/rust/pull/28494
2280
2281Version 1.3.0 (2015-09-17)
c1a9b12d
SL
2282==============================
2283
2284* ~900 changes, numerous bugfixes
2285
2286Highlights
2287----------
2288
2289* The [new object lifetime defaults][nold] have been [turned
2290 on][nold2] after a cycle of warnings about the change. Now types
2291 like `&'a Box<Trait>` (or `&'a Rc<Trait>`, etc) will change from
2292 being interpreted as `&'a Box<Trait+'a>` to `&'a
2293 Box<Trait+'static>`.
2294* [The Rustonomicon][nom] is a new book in the official documentation
2295 that dives into writing unsafe Rust.
2296* The [`Duration`] API, [has been stabilized][ds]. This basic unit of
2297 timekeeping is employed by other std APIs, as well as out-of-tree
2298 time crates.
2299
2300Breaking Changes
2301----------------
2302
2303* The [new object lifetime defaults][nold] have been [turned
2304 on][nold2] after a cycle of warnings about the change.
2305* There is a known [regression][lr] in how object lifetime elision is
2306 interpreted, the proper solution for which is undetermined.
2307* The `#[prelude_import]` attribute, an internal implementation
2308 detail, was accidentally stabilized previously. [It has been put
2309 behind the `prelude_import` feature gate][pi]. This change is
2310 believed to break no existing code.
2311* The behavior of [`size_of_val`][dst1] and [`align_of_val`][dst2] is
2312 [more sane for dynamically sized types][dst3]. Code that relied on
2313 the previous behavior is thought to be broken.
2314* The `dropck` rules, which checks that destructors can't access
2315 destroyed values, [have been updated][dropck] to match the
2316 [RFC][dropckrfc]. This fixes some soundness holes, and as such will
2317 cause some previously-compiling code to no longer build.
2318
2319Language
2320--------
2321
2322* The [new object lifetime defaults][nold] have been [turned
2323 on][nold2] after a cycle of warnings about the change.
2324* Semicolons may [now follow types and paths in
2325 macros](https://github.com/rust-lang/rust/pull/27000).
2326* The behavior of [`size_of_val`][dst1] and [`align_of_val`][dst2] is
2327 [more sane for dynamically sized types][dst3]. Code that relied on
2328 the previous behavior is not known to exist, and suspected to be
2329 broken.
2330* `'static` variables [may now be recursive][st].
2331* `ref` bindings choose between [`Deref`] and [`DerefMut`]
2332 implementations correctly.
2333* The `dropck` rules, which checks that destructors can't access
2334 destroyed values, [have been updated][dropck] to match the
2335 [RFC][dropckrfc].
2336
2337Libraries
2338---------
2339
2340* The [`Duration`] API, [has been stabilized][ds], as well as the
2341 `std::time` module, which presently contains only `Duration`.
2342* `Box<str>` and `Box<[T]>` both implement `Clone`.
2343* The owned C string, [`CString`], implements [`Borrow`] and the
2344 borrowed C string, [`CStr`], implements [`ToOwned`]. The two of
2345 these allow C strings to be borrowed and cloned in generic code.
2346* [`CStr`] implements [`Debug`].
2347* [`AtomicPtr`] implements [`Debug`].
2348* [`Error`] trait objects [can be downcast to their concrete types][e]
2349 in many common configurations, using the [`is`], [`downcast`],
2350 [`downcast_ref`] and [`downcast_mut`] methods, similarly to the
2351 [`Any`] trait.
2352* Searching for substrings now [employs the two-way algorithm][search]
2353 instead of doing a naive search. This gives major speedups to a
2354 number of methods, including [`contains`][sc], [`find`][sf],
2355 [`rfind`][srf], [`split`][ss]. [`starts_with`][ssw] and
2356 [`ends_with`][sew] are also faster.
2357* The performance of `PartialEq` for slices is [much faster][ps].
2358* The [`Hash`] trait offers the default method, [`hash_slice`], which
2359 is overridden and optimized by the implementations for scalars.
2360* The [`Hasher`] trait now has a number of specialized `write_*`
2361 methods for primitive types, for efficiency.
2362* The I/O-specific error type, [`std::io::Error`][ie], gained a set of
2363 methods for accessing the 'inner error', if any: [`get_ref`][iegr],
2364 [`get_mut`][iegm], [`into_inner`][ieii]. As well, the implementation
2365 of [`std::error::Error::cause`][iec] also delegates to the inner
2366 error.
2367* [`process::Child`][pc] gained the [`id`] method, which returns a
2368 `u32` representing the platform-specific process identifier.
2369* The [`connect`] method on slices is deprecated, replaced by the new
2370 [`join`] method (note that both of these are on the *unstable*
2371 [`SliceConcatExt`] trait, but through the magic of the prelude are
2372 available to stable code anyway).
2373* The [`Div`] operator is implemented for [`Wrapping`] types.
2374* [`DerefMut` is implemented for `String`][dms].
2375* Performance of SipHash (the default hasher for `HashMap`) is
2376 [better for long data][sh].
2377* [`AtomicPtr`] implements [`Send`].
2378* The [`read_to_end`] implementations for [`Stdin`] and [`File`]
2379 are now [specialized to use uninitalized buffers for increased
2380 performance][rte].
2381* Lifetime parameters of foreign functions [are now resolved
2382 properly][f].
2383
2384Misc
2385----
2386
2387* Rust can now, with some coercion, [produce programs that run on
2388 Windows XP][xp], though XP is not considered a supported platform.
2389* Porting Rust on Windows from the GNU toolchain to MSVC continues
2390 ([1][win1], [2][win2], [3][win3], [4][win4]). It is still not
2391 recommended for use in 1.3, though should be fully-functional
2392 in the [64-bit 1.4 beta][b14].
2393* On Fedora-based systems installation will [properly configure the
2394 dynamic linker][fl].
2395* The compiler gained many new extended error descriptions, which can
2396 be accessed with the `--explain` flag.
2397* The `dropck` pass, which checks that destructors can't access
2398 destroyed values, [has been rewritten][dropck]. This fixes some
2399 soundness holes, and as such will cause some previously-compiling
2400 code to no longer build.
2401* `rustc` now uses [LLVM to write archive files where possible][ar].
2402 Eventually this will eliminate the compiler's dependency on the ar
2403 utility.
2404* Rust has [preliminary support for i686 FreeBSD][fb] (it has long
2405 supported FreeBSD on x86_64).
2406* The [`unused_mut`][lum], [`unconditional_recursion`][lur],
2407 [`improper_ctypes`][lic], and [`negate_unsigned`][lnu] lints are
2408 more strict.
2409* If landing pads are disabled (with `-Z no-landing-pads`), [`panic!`
2410 will kill the process instead of leaking][nlp].
2411
2412[`Any`]: http://doc.rust-lang.org/nightly/std/any/trait.Any.html
2413[`AtomicPtr`]: http://doc.rust-lang.org/nightly/std/sync/atomic/struct.AtomicPtr.html
2414[`Borrow`]: http://doc.rust-lang.org/nightly/std/borrow/trait.Borrow.html
2415[`CStr`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html
2416[`CString`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html
2417[`Debug`]: http://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
2418[`DerefMut`]: http://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
2419[`Deref`]: http://doc.rust-lang.org/nightly/std/ops/trait.Deref.html
2420[`Div`]: http://doc.rust-lang.org/nightly/std/ops/trait.Div.html
2421[`Duration`]: http://doc.rust-lang.org/nightly/std/time/struct.Duration.html
2422[`Error`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html
2423[`File`]: http://doc.rust-lang.org/nightly/std/fs/struct.File.html
2424[`Hash`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html
e9174d1e 2425[`Hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hasher.html
c1a9b12d
SL
2426[`Send`]: http://doc.rust-lang.org/nightly/std/marker/trait.Send.html
2427[`SliceConcatExt`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html
2428[`Stdin`]: http://doc.rust-lang.org/nightly/std/io/struct.Stdin.html
2429[`ToOwned`]: http://doc.rust-lang.org/nightly/std/borrow/trait.ToOwned.html
2430[`Wrapping`]: http://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
2431[`connect`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html#method.connect
2432[`downcast_mut`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast_mut
2433[`downcast_ref`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast_ref
2434[`downcast`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast
2435[`hash_slice`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html#method.hash_slice
2436[`id`]: http://doc.rust-lang.org/nightly/std/process/struct.Child.html#method.id
2437[`is`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.is
2438[`join`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html#method.join
2439[`read_to_end`]: http://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end
2440[ar]: https://github.com/rust-lang/rust/pull/26926
2441[b14]: https://static.rust-lang.org/dist/rust-beta-x86_64-pc-windows-msvc.msi
2442[dms]: https://github.com/rust-lang/rust/pull/26241
2443[dropck]: https://github.com/rust-lang/rust/pull/27261
2444[dropckrfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
2445[ds]: https://github.com/rust-lang/rust/pull/26818
2446[dst1]: http://doc.rust-lang.org/nightly/std/mem/fn.size_of_val.html
2447[dst2]: http://doc.rust-lang.org/nightly/std/mem/fn.align_of_val.html
2448[dst3]: https://github.com/rust-lang/rust/pull/27351
2449[e]: https://github.com/rust-lang/rust/pull/24793
2450[f]: https://github.com/rust-lang/rust/pull/26588
2451[fb]: https://github.com/rust-lang/rust/pull/26959
2452[fl]: https://github.com/rust-lang/rust-installer/pull/41
2453[hs]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html#method.hash_slice
2454[ie]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html
2455[iec]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.cause
2456[iegm]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.get_mut
2457[iegr]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.get_ref
2458[ieii]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.into_inner
2459[lic]: https://github.com/rust-lang/rust/pull/26583
2460[lnu]: https://github.com/rust-lang/rust/pull/27026
2461[lr]: https://github.com/rust-lang/rust/issues/27248
2462[lum]: https://github.com/rust-lang/rust/pull/26378
2463[lur]: https://github.com/rust-lang/rust/pull/26783
2464[nlp]: https://github.com/rust-lang/rust/pull/27176
2465[nold2]: https://github.com/rust-lang/rust/pull/27045
2466[nold]: https://github.com/rust-lang/rfcs/blob/master/text/1156-adjust-default-object-bounds.md
2467[nom]: http://doc.rust-lang.org/nightly/nomicon/
2468[pc]: http://doc.rust-lang.org/nightly/std/process/struct.Child.html
2469[pi]: https://github.com/rust-lang/rust/pull/26699
2470[ps]: https://github.com/rust-lang/rust/pull/26884
2471[rte]: https://github.com/rust-lang/rust/pull/26950
2472[sc]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.contains
2473[search]: https://github.com/rust-lang/rust/pull/26327
2474[sew]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.ends_with
2475[sf]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.find
2476[sh]: https://github.com/rust-lang/rust/pull/27280
2477[srf]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rfind
2478[ss]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split
2479[ssw]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.starts_with
2480[st]: https://github.com/rust-lang/rust/pull/26630
2481[win1]: https://github.com/rust-lang/rust/pull/26569
2482[win2]: https://github.com/rust-lang/rust/pull/26741
2483[win3]: https://github.com/rust-lang/rust/pull/26741
2484[win4]: https://github.com/rust-lang/rust/pull/27210
2485[xp]: https://github.com/rust-lang/rust/pull/26569
2486
e9174d1e
SL
2487Version 1.2.0 (2015-08-07)
2488==========================
62682a34
SL
2489
2490* ~1200 changes, numerous bugfixes
2491
2492Highlights
2493----------
2494
2495* [Dynamically-sized-type coercions][dst] allow smart pointer types
2496 like `Rc` to contain types without a fixed size, arrays and trait
2497 objects, finally enabling use of `Rc<[T]>` and completing the
2498 implementation of DST.
2499* [Parallel codegen][parcodegen] is now working again, which can
2500 substantially speed up large builds in debug mode; It also gets
2501 another ~33% speedup when bootstrapping on a 4 core machine (using 8
2502 jobs). It's not enabled by default, but will be "in the near
2503 future". It can be activated with the `-C codegen-units=N` flag to
2504 `rustc`.
2505* This is the first release with [experimental support for linking
2506 with the MSVC linker and lib C on Windows (instead of using the GNU
2507 variants via MinGW)][win]. It is yet recommended only for the most
2508 intrepid Rusticians.
2509* Benchmark compilations are showing a 30% improvement in
2510 bootstrapping over 1.1.
2511
2512Breaking Changes
2513----------------
2514
2515* The [`to_uppercase`] and [`to_lowercase`] methods on `char` now do
2516 unicode case mapping, which is a previously-planned change in
2517 behavior and considered a bugfix.
2518* [`mem::align_of`] now specifies [the *minimum alignment* for
2519 T][align], which is usually the alignment programs are interested
2520 in, and the same value reported by clang's
2521 `alignof`. [`mem::min_align_of`] is deprecated. This is not known to
2522 break real code.
2523* [The `#[packed]` attribute is no longer silently accepted by the
2524 compiler][packed]. This attribute did nothing and code that
2525 mentioned it likely did not work as intended.
2526* Associated type defaults are [now behind the
2527 `associated_type_defaults` feature gate][ad]. In 1.1 associated type
2528 defaults *did not work*, but could be mentioned syntactically. As
2529 such this breakage has minimal impact.
2530
2531Language
2532--------
2533
2534* Patterns with `ref mut` now correctly invoke [`DerefMut`] when
2535 matching against dereferencable values.
2536
2537Libraries
2538---------
2539
2540* The [`Extend`] trait, which grows a collection from an iterator, is
2541 implemented over iterators of references, for `String`, `Vec`,
2542 `LinkedList`, `VecDeque`, `EnumSet`, `BinaryHeap`, `VecMap`,
2543 `BTreeSet` and `BTreeMap`. [RFC][extend-rfc].
2544* The [`iter::once`] function returns an iterator that yields a single
2545 element, and [`iter::empty`] returns an iterator that yields no
2546 elements.
2547* The [`matches`] and [`rmatches`] methods on `str` return iterators
2548 over substring matches.
2549* [`Cell`] and [`RefCell`] both implement `Eq`.
2550* A number of methods for wrapping arithmetic are added to the
2551 integral types, [`wrapping_div`], [`wrapping_rem`],
2552 [`wrapping_neg`], [`wrapping_shl`], [`wrapping_shr`]. These are in
2553 addition to the existing [`wrapping_add`], [`wrapping_sub`], and
2554 [`wrapping_mul`] methods, and alternatives to the [`Wrapping`]
2555 type.. It is illegal for the default arithmetic operations in Rust
2556 to overflow; the desire to wrap must be explicit.
2557* The `{:#?}` formatting specifier [displays the alternate,
2558 pretty-printed][debugfmt] form of the `Debug` formatter. This
2559 feature was actually introduced prior to 1.0 with little
2560 fanfare.
2561* [`fmt::Formatter`] implements [`fmt::Write`], a `fmt`-specific trait
2562 for writing data to formatted strings, similar to [`io::Write`].
2563* [`fmt::Formatter`] adds 'debug builder' methods, [`debug_struct`],
2564 [`debug_tuple`], [`debug_list`], [`debug_set`], [`debug_map`]. These
2565 are used by code generators to emit implementations of [`Debug`].
2566* `str` has new [`to_uppercase`][strup] and [`to_lowercase`][strlow]
2567 methods that convert case, following Unicode case mapping.
2568* It is now easier to handle poisoned locks. The [`PoisonError`]
2569 type, returned by failing lock operations, exposes `into_inner`,
2570 `get_ref`, and `get_mut`, which all give access to the inner lock
2571 guard, and allow the poisoned lock to continue to operate. The
2572 `is_poisoned` method of [`RwLock`] and [`Mutex`] can poll for a
2573 poisoned lock without attempting to take the lock.
2574* On Unix the [`FromRawFd`] trait is implemented for [`Stdio`], and
2575 [`AsRawFd`] for [`ChildStdin`], [`ChildStdout`], [`ChildStderr`].
2576 On Windows the `FromRawHandle` trait is implemented for `Stdio`,
2577 and `AsRawHandle` for `ChildStdin`, `ChildStdout`,
2578 `ChildStderr`.
2579* [`io::ErrorKind`] has a new variant, `InvalidData`, which indicates
2580 malformed input.
2581
2582Misc
2583----
2584
2585* `rustc` employs smarter heuristics for guessing at [typos].
2586* `rustc` emits more efficient code for [no-op conversions between
2587 unsafe pointers][nop].
2588* Fat pointers are now [passed in pairs of immediate arguments][fat],
2589 resulting in faster compile times and smaller code.
2590
e9174d1e 2591[`Extend`]: https://doc.rust-lang.org/nightly/std/iter/trait.Extend.html
62682a34 2592[extend-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
e9174d1e
SL
2593[`iter::once`]: https://doc.rust-lang.org/nightly/std/iter/fn.once.html
2594[`iter::empty`]: https://doc.rust-lang.org/nightly/std/iter/fn.empty.html
2595[`matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.matches
2596[`rmatches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatches
2597[`Cell`]: https://doc.rust-lang.org/nightly/std/cell/struct.Cell.html
2598[`RefCell`]: https://doc.rust-lang.org/nightly/std/cell/struct.RefCell.html
2599[`wrapping_add`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_add
2600[`wrapping_sub`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_sub
2601[`wrapping_mul`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_mul
2602[`wrapping_div`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_div
2603[`wrapping_rem`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_rem
2604[`wrapping_neg`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_neg
2605[`wrapping_shl`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shl
2606[`wrapping_shr`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shr
2607[`Wrapping`]: https://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
2608[`fmt::Formatter`]: https://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html
2609[`fmt::Write`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Write.html
2610[`io::Write`]: https://doc.rust-lang.org/nightly/std/io/trait.Write.html
2611[`debug_struct`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_struct
2612[`debug_tuple`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_tuple
2613[`debug_list`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_list
2614[`debug_set`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_set
2615[`debug_map`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_map
2616[`Debug`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
2617[strup]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_uppercase
2618[strlow]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_lowercase
2619[`to_uppercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_uppercase
2620[`to_lowercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase
2621[`PoisonError`]: https://doc.rust-lang.org/nightly/std/sync/struct.PoisonError.html
2622[`RwLock`]: https://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html
2623[`Mutex`]: https://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html
2624[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
2625[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
2626[`Stdio`]: https://doc.rust-lang.org/nightly/std/process/struct.Stdio.html
2627[`ChildStdin`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdin.html
2628[`ChildStdout`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdout.html
2629[`ChildStderr`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStderr.html
2630[`io::ErrorKind`]: https://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html
62682a34 2631[debugfmt]: https://www.reddit.com/r/rust/comments/3ceaui/psa_produces_prettyprinted_debug_output/
e9174d1e
SL
2632[`DerefMut`]: https://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
2633[`mem::align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.align_of.html
62682a34 2634[align]: https://github.com/rust-lang/rust/pull/25646
e9174d1e 2635[`mem::min_align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.min_align_of.html
62682a34
SL
2636[typos]: https://github.com/rust-lang/rust/pull/26087
2637[nop]: https://github.com/rust-lang/rust/pull/26336
2638[fat]: https://github.com/rust-lang/rust/pull/26411
2639[dst]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
2640[parcodegen]: https://github.com/rust-lang/rust/pull/26018
2641[packed]: https://github.com/rust-lang/rust/pull/25541
2642[ad]: https://github.com/rust-lang/rust/pull/27382
2643[win]: https://github.com/rust-lang/rust/pull/25350
2644
e9174d1e 2645Version 1.1.0 (2015-06-25)
d9579d0f
AL
2646=========================
2647
2648* ~850 changes, numerous bugfixes
2649
2650Highlights
2651----------
2652
c1a9b12d 2653* The [`std::fs` module has been expanded][fs] to expand the set of
d9579d0f
AL
2654 functionality exposed:
2655 * `DirEntry` now supports optimizations like `file_type` and `metadata` which
2656 don't incur a syscall on some platforms.
2657 * A `symlink_metadata` function has been added.
2658 * The `fs::Metadata` structure now lowers to its OS counterpart, providing
2659 access to all underlying information.
c1a9b12d
SL
2660* The compiler now contains extended explanations of many errors. When an error
2661 with an explanation occurs the compiler suggests using the `--explain` flag
2662 to read the explanation. Error explanations are also [available online][err-index].
d9579d0f
AL
2663* Thanks to multiple [improvements][sk] to [type checking][pre], as
2664 well as other work, the time to bootstrap the compiler decreased by
2665 32%.
2666
2667Libraries
2668---------
2669
c1a9b12d 2670* The [`str::split_whitespace`] method splits a string on unicode
d9579d0f
AL
2671 whitespace boundaries.
2672* On both Windows and Unix, new extension traits provide conversion of
2673 I/O types to and from the underlying system handles. On Unix, these
c1a9b12d 2674 traits are [`FromRawFd`] and [`AsRawFd`], on Windows `FromRawHandle`
d9579d0f
AL
2675 and `AsRawHandle`. These are implemented for `File`, `TcpStream`,
2676 `TcpListener`, and `UpdSocket`. Further implementations for
2677 `std::process` will be stabilized later.
2678* On Unix, [`std::os::unix::symlink`] creates symlinks. On
2679 Windows, symlinks can be created with
2680 `std::os::windows::symlink_dir` and
2681 `std::os::windows::symlink_file`.
2682* The `mpsc::Receiver` type can now be converted into an iterator with
2683 `into_iter` on the [`IntoIterator`] trait.
2684* `Ipv4Addr` can be created from `u32` with the `From<u32>`
2685 implementation of the [`From`] trait.
2686* The `Debug` implementation for `RangeFull` [creates output that is
2687 more consistent with other implementations][rf].
2688* [`Debug` is implemented for `File`][file].
2689* The `Default` implementation for `Arc` [no longer requires `Sync +
2690 Send`][arc].
2691* [The `Iterator` methods `count`, `nth`, and `last` have been
2692 overridden for slices to have O(1) performance instead of O(n)][si].
2693* Incorrect handling of paths on Windows has been improved in both the
2694 compiler and the standard library.
2695* [`AtomicPtr` gained a `Default` implementation][ap].
2696* In accordance with Rust's policy on arithmetic overflow `abs` now
2697 [panics on overflow when debug assertions are enabled][abs].
2698* The [`Cloned`] iterator, which was accidentally left unstable for
2699 1.0 [has been stabilized][c].
2700* The [`Incoming`] iterator, which iterates over incoming TCP
2701 connections, and which was accidentally unnamable in 1.0, [is now
2702 properly exported][inc].
2703* [`BinaryHeap`] no longer corrupts itself [when functions called by
2704 `sift_up` or `sift_down` panic][bh].
2705* The [`split_off`] method of `LinkedList` [no longer corrupts
2706 the list in certain scenarios][ll].
2707
2708Misc
2709----
2710
2711* Type checking performance [has improved notably][sk] with
2712 [multiple improvements][pre].
2713* The compiler [suggests code changes][ch] for more errors.
2714* rustc and it's build system have experimental support for [building
2715 toolchains against MUSL][m] instead of glibc on Linux.
2716* The compiler defines the `target_env` cfg value, which is used for
2717 distinguishing toolchains that are otherwise for the same
2718 platform. Presently this is set to `gnu` for common GNU Linux
2719 targets and for MinGW targets, and `musl` for MUSL Linux targets.
2720* The [`cargo rustc`][crc] command invokes a build with custom flags
2721 to rustc.
2722* [Android executables are always position independent][pie].
2723* [The `drop_with_repr_extern` lint warns about mixing `repr(C)`
2724 with `Drop`][drop].
2725
e9174d1e
SL
2726[`str::split_whitespace`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
2727[`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
2728[`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
2729[`std::os::unix::symlink`]: https://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
2730[`IntoIterator`]: https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
2731[`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html
d9579d0f 2732[rf]: https://github.com/rust-lang/rust/pull/24491
e9174d1e 2733[err-index]: https://doc.rust-lang.org/error-index.html
d9579d0f
AL
2734[sk]: https://github.com/rust-lang/rust/pull/24615
2735[pre]: https://github.com/rust-lang/rust/pull/25323
2736[file]: https://github.com/rust-lang/rust/pull/24598
2737[ch]: https://github.com/rust-lang/rust/pull/24683
2738[arc]: https://github.com/rust-lang/rust/pull/24695
2739[si]: https://github.com/rust-lang/rust/pull/24701
2740[ap]: https://github.com/rust-lang/rust/pull/24834
2741[m]: https://github.com/rust-lang/rust/pull/24777
2742[fs]: https://github.com/rust-lang/rfcs/blob/master/text/1044-io-fs-2.1.md
2743[crc]: https://github.com/rust-lang/cargo/pull/1568
2744[pie]: https://github.com/rust-lang/rust/pull/24953
2745[abs]: https://github.com/rust-lang/rust/pull/25441
2746[c]: https://github.com/rust-lang/rust/pull/25496
e9174d1e
SL
2747[`Cloned`]: https://doc.rust-lang.org/nightly/std/iter/struct.Cloned.html
2748[`Incoming`]: https://doc.rust-lang.org/nightly/std/net/struct.Incoming.html
d9579d0f
AL
2749[inc]: https://github.com/rust-lang/rust/pull/25522
2750[bh]: https://github.com/rust-lang/rust/pull/25856
e9174d1e 2751[`BinaryHeap`]: https://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html
d9579d0f 2752[ll]: https://github.com/rust-lang/rust/pull/26022
e9174d1e 2753[`split_off`]: https://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
d9579d0f
AL
2754[drop]: https://github.com/rust-lang/rust/pull/24935
2755
e9174d1e 2756Version 1.0.0 (2015-05-15)
bd371182 2757========================
c34b1796 2758
bd371182 2759* ~1500 changes, numerous bugfixes
c34b1796 2760
bd371182
AL
2761Highlights
2762----------
2763
2764* The vast majority of the standard library is now `#[stable]`. It is
2765 no longer possible to use unstable features with a stable build of
2766 the compiler.
2767* Many popular crates on [crates.io] now work on the stable release
2768 channel.
2769* Arithmetic on basic integer types now [checks for overflow in debug
2770 builds][overflow].
2771
2772Language
2773--------
2774
2775* Several [restrictions have been added to trait coherence][coh] in
2776 order to make it easier for upstream authors to change traits
62682a34 2777 without breaking downstream code.
bd371182
AL
2778* Digits of binary and octal literals are [lexed more eagerly][lex] to
2779 improve error messages and macro behavior. For example, `0b1234` is
2780 now lexed as `0b1234` instead of two tokens, `0b1` and `234`.
62682a34 2781* Trait bounds [are always invariant][inv], eliminating the need for
bd371182
AL
2782 the `PhantomFn` and `MarkerTrait` lang items, which have been
2783 removed.
2784* ["-" is no longer a valid character in crate names][cr], the `extern crate
2785 "foo" as bar` syntax has been replaced with `extern crate foo as
2786 bar`, and Cargo now automatically translates "-" in *package* names
2787 to underscore for the crate name.
2788* [Lifetime shadowing is an error][lt].
2789* [`Send` no longer implies `'static`][send-rfc].
2790* [UFCS now supports trait-less associated paths][moar-ufcs] like
2791 `MyType::default()`.
2792* Primitive types [now have inherent methods][prim-inherent],
2793 obviating the need for extension traits like `SliceExt`.
2794* Methods with `Self: Sized` in their `where` clause are [considered
2795 object-safe][self-sized], allowing many extension traits like
2796 `IteratorExt` to be merged into the traits they extended.
2797* You can now [refer to associated types][assoc-where] whose
2798 corresponding trait bounds appear only in a `where` clause.
2799* The final bits of [OIBIT landed][oibit-final], meaning that traits
2800 like `Send` and `Sync` are now library-defined.
2801* A [Reflect trait][reflect] was introduced, which means that
2802 downcasting via the `Any` trait is effectively limited to concrete
2803 types. This helps retain the potentially-important "parametricity"
2804 property: generic code cannot behave differently for different type
2805 arguments except in minor ways.
2806* The `unsafe_destructor` feature is now deprecated in favor of the
2807 [new `dropck`][dropck]. This change is a major reduction in unsafe
2808 code.
c34b1796 2809
bd371182
AL
2810Libraries
2811---------
c34b1796 2812
bd371182
AL
2813* The `thread_local` module [has been renamed to `std::thread`][th].
2814* The methods of `IteratorExt` [have been moved to the `Iterator`
2815 trait itself][ie].
2816* Several traits that implement Rust's conventions for type
2817 conversions, `AsMut`, `AsRef`, `From`, and `Into` have been
2818 [centralized in the `std::convert` module][con].
2819* The `FromError` trait [was removed in favor of `From`][fe].
2820* The basic sleep function [has moved to
2821 `std::thread::sleep_ms`][slp].
2822* The `splitn` function now takes an `n` parameter that represents the
2823 number of items yielded by the returned iterator [instead of the
2824 number of 'splits'][spl].
2825* [On Unix, all file descriptors are `CLOEXEC` by default][clo].
2826* [Derived implementations of `PartialOrd` now order enums according
2827 to their explicitly-assigned discriminants][po].
2828* [Methods for searching strings are generic over `Pattern`s][pat],
2829 implemented presently by `&char`, `&str`, `FnMut(char) -> bool` and
2830 some others.
2831* [In method resolution, object methods are resolved before inherent
2832 methods][meth].
2833* [`String::from_str` has been deprecated in favor of the `From` impl,
2834 `String::from`][sf].
2835* [`io::Error` implements `Sync`][ios].
2836* [The `words` method on `&str` has been replaced with
2837 `split_whitespace`][sw], to avoid answering the tricky question, 'what is
2838 a word?'
2839* The new path and IO modules are complete and `#[stable]`. This
2840 was the major library focus for this cycle.
2841* The path API was [revised][path-normalize] to normalize `.`,
2842 adjusting the tradeoffs in favor of the most common usage.
2843* A large number of remaining APIs in `std` were also stabilized
2844 during this cycle; about 75% of the non-deprecated API surface
2845 is now stable.
2846* The new [string pattern API][string-pattern] landed, which makes
2847 the string slice API much more internally consistent and flexible.
2848* A new set of [generic conversion traits][conversion] replaced
2849 many existing ad hoc traits.
2850* Generic numeric traits were [completely removed][num-traits]. This
2851 was made possible thanks to inherent methods for primitive types,
2852 and the removal gives maximal flexibility for designing a numeric
2853 hierarchy in the future.
2854* The `Fn` traits are now related via [inheritance][fn-inherit]
2855 and provide ergonomic [blanket implementations][fn-blanket].
2856* The `Index` and `IndexMut` traits were changed to
2857 [take the index by value][index-value], enabling code like
2858 `hash_map["string"]` to work.
2859* `Copy` now [inherits][copy-clone] from `Clone`, meaning that all
2860 `Copy` data is known to be `Clone` as well.
2861
2862Misc
2863----
2864
2865* Many errors now have extended explanations that can be accessed with
2866 the `--explain` flag to `rustc`.
2867* Many new examples have been added to the standard library
2868 documentation.
2869* rustdoc has received a number of improvements focused on completion
2870 and polish.
2871* Metadata was tuned, shrinking binaries [by 27%][metadata-shrink].
2872* Much headway was made on ecosystem-wide CI, making it possible
2873 to [compare builds for breakage][ci-compare].
2874
2875
2876[crates.io]: http://crates.io
2877[clo]: https://github.com/rust-lang/rust/pull/24034
2878[coh]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md
2879[con]: https://github.com/rust-lang/rust/pull/23875
2880[cr]: https://github.com/rust-lang/rust/pull/23419
2881[fe]: https://github.com/rust-lang/rust/pull/23879
2882[ie]: https://github.com/rust-lang/rust/pull/23300
2883[inv]: https://github.com/rust-lang/rust/pull/23938
2884[ios]: https://github.com/rust-lang/rust/pull/24133
2885[lex]: https://github.com/rust-lang/rfcs/blob/master/text/0879-small-base-lexing.md
2886[lt]: https://github.com/rust-lang/rust/pull/24057
2887[meth]: https://github.com/rust-lang/rust/pull/24056
2888[pat]: https://github.com/rust-lang/rfcs/blob/master/text/0528-string-patterns.md
2889[po]: https://github.com/rust-lang/rust/pull/24270
2890[sf]: https://github.com/rust-lang/rust/pull/24517
2891[slp]: https://github.com/rust-lang/rust/pull/23949
2892[spl]: https://github.com/rust-lang/rfcs/blob/master/text/0979-align-splitn-with-other-languages.md
2893[sw]: https://github.com/rust-lang/rfcs/blob/master/text/1054-str-words.md
2894[th]: https://github.com/rust-lang/rfcs/blob/master/text/0909-move-thread-local-to-std-thread.md
c34b1796 2895[send-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0458-send-improvements.md
c34b1796
AL
2896[moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
2897[prim-inherent]: https://github.com/rust-lang/rust/pull/23104
2898[overflow]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
2899[metadata-shrink]: https://github.com/rust-lang/rust/pull/22971
2900[self-sized]: https://github.com/rust-lang/rust/pull/22301
2901[assoc-where]: https://github.com/rust-lang/rust/pull/22512
2902[string-pattern]: https://github.com/rust-lang/rust/pull/22466
2903[oibit-final]: https://github.com/rust-lang/rust/pull/21689
2904[reflect]: https://github.com/rust-lang/rust/pull/23712
c34b1796
AL
2905[conversion]: https://github.com/rust-lang/rfcs/pull/529
2906[num-traits]: https://github.com/rust-lang/rust/pull/23549
2907[index-value]: https://github.com/rust-lang/rust/pull/23601
2908[dropck]: https://github.com/rust-lang/rfcs/pull/769
c34b1796
AL
2909[ci-compare]: https://gist.github.com/brson/a30a77836fbec057cbee
2910[fn-inherit]: https://github.com/rust-lang/rust/pull/23282
2911[fn-blanket]: https://github.com/rust-lang/rust/pull/23895
2912[copy-clone]: https://github.com/rust-lang/rust/pull/23860
2913[path-normalize]: https://github.com/rust-lang/rust/pull/23229
2914
bd371182 2915
b039eaaf 2916Version 1.0.0-alpha.2 (2015-02-20)
62682a34 2917=====================================
85aaf69f
SL
2918
2919* ~1300 changes, numerous bugfixes
2920
2921* Highlights
2922
2923 * The various I/O modules were [overhauled][io-rfc] to reduce
62682a34 2924 unnecessary abstractions and provide better interoperation with
85aaf69f
SL
2925 the underlying platform. The old `io` module remains temporarily
2926 at `std::old_io`.
62682a34 2927 * The standard library now [participates in feature gating][feat],
85aaf69f
SL
2928 so use of unstable libraries now requires a `#![feature(...)]`
2929 attribute. The impact of this change is [described on the
2930 forum][feat-forum]. [RFC][feat-rfc].
2931
2932* Language
2933
2934 * `for` loops [now operate on the `IntoIterator` trait][into],
2935 which eliminates the need to call `.iter()`, etc. to iterate
2936 over collections. There are some new subtleties to remember
2937 though regarding what sort of iterators various types yield, in
2938 particular that `for foo in bar { }` yields values from a move
2939 iterator, destroying the original collection. [RFC][into-rfc].
2940 * Objects now have [default lifetime bounds][obj], so you don't
2941 have to write `Box<Trait+'static>` when you don't care about
2942 storing references. [RFC][obj-rfc].
2943 * In types that implement `Drop`, [lifetimes must outlive the
2944 value][drop]. This will soon make it possible to safely
2945 implement `Drop` for types where `#[unsafe_destructor]` is now
2946 required. Read the [gorgeous RFC][drop-rfc] for details.
2947 * The fully qualified <T as Trait>::X syntax lets you set the Self
2948 type for a trait method or associated type. [RFC][ufcs-rfc].
2949 * References to types that implement `Deref<U>` now [automatically
2950 coerce to references][deref] to the dereferenced type `U`,
2951 e.g. `&T where T: Deref<U>` automatically coerces to `&U`. This
2952 should eliminate many unsightly uses of `&*`, as when converting
2953 from references to vectors into references to
2954 slices. [RFC][deref-rfc].
2955 * The explicit [closure kind syntax][close] (`|&:|`, `|&mut:|`,
2956 `|:|`) is obsolete and closure kind is inferred from context.
2957 * [`Self` is a keyword][Self].
2958
2959* Libraries
2960
2961 * The `Show` and `String` formatting traits [have been
2962 renamed][fmt] to `Debug` and `Display` to more clearly reflect
2963 their related purposes. Automatically getting a string
2964 conversion to use with `format!("{:?}", something_to_debug)` is
2965 now written `#[derive(Debug)]`.
2966 * Abstract [OS-specific string types][osstr], `std::ff::{OsString,
2967 OsStr}`, provide strings in platform-specific encodings for easier
2968 interop with system APIs. [RFC][osstr-rfc].
c34b1796 2969 * The `boxed::into_raw` and `Box::from_raw` functions [convert
85aaf69f
SL
2970 between `Box<T>` and `*mut T`][boxraw], a common pattern for
2971 creating raw pointers.
2972
2973* Tooling
2974
2975 * Certain long error messages of the form 'expected foo found bar'
2976 are now [split neatly across multiple
2977 lines][multiline]. Examples in the PR.
2978 * On Unix Rust can be [uninstalled][un] by running
2979 `/usr/local/lib/rustlib/uninstall.sh`.
2980 * The `#[rustc_on_unimplemented]` attribute, requiring the
2981 'on_unimplemented' feature, lets rustc [display custom error
2982 messages when a trait is expected to be implemented for a type
2983 but is not][onun].
2984
2985* Misc
2986
2987 * Rust is tested against a [LALR grammar][lalr], which parses
2988 almost all the Rust files that rustc does.
2989
2990[boxraw]: https://github.com/rust-lang/rust/pull/21318
2991[close]: https://github.com/rust-lang/rust/pull/21843
2992[deref]: https://github.com/rust-lang/rust/pull/21351
2993[deref-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0241-deref-conversions.md
2994[drop]: https://github.com/rust-lang/rust/pull/21972
2995[drop-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
2996[feat]: https://github.com/rust-lang/rust/pull/21248
e9174d1e 2997[feat-forum]: https://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
85aaf69f
SL
2998[feat-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
2999[fmt]: https://github.com/rust-lang/rust/pull/21457
3000[into]: https://github.com/rust-lang/rust/pull/20790
3001[into-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md#intoiterator-and-iterable
3002[io-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
3003[lalr]: https://github.com/rust-lang/rust/pull/21452
3004[multiline]: https://github.com/rust-lang/rust/pull/19870
3005[obj]: https://github.com/rust-lang/rust/pull/22230
3006[obj-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0599-default-object-bound.md
3007[onun]: https://github.com/rust-lang/rust/pull/20889
3008[osstr]: https://github.com/rust-lang/rust/pull/21488
3009[osstr-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
3010[Self]: https://github.com/rust-lang/rust/pull/22158
85aaf69f
SL
3011[ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
3012[un]: https://github.com/rust-lang/rust/pull/22256
3013
62682a34 3014
b039eaaf 3015Version 1.0.0-alpha (2015-01-09)
62682a34 3016==================================
1a4d82fc
JJ
3017
3018 * ~2400 changes, numerous bugfixes
3019
3020 * Highlights
3021
3022 * The language itself is considered feature complete for 1.0,
3023 though there will be many usability improvements and bugfixes
3024 before the final release.
3025 * Nearly 50% of the public API surface of the standard library has
3026 been declared 'stable'. Those interfaces are unlikely to change
3027 before 1.0.
3028 * The long-running debate over integer types has been
3029 [settled][ints]: Rust will ship with types named `isize` and
3030 `usize`, rather than `int` and `uint`, for pointer-sized
3031 integers. Guidelines will be rolled out during the alpha cycle.
3032 * Most crates that are not `std` have been moved out of the Rust
3033 distribution into the Cargo ecosystem so they can evolve
3034 separately and don't need to be stabilized as quickly, including
3035 'time', 'getopts', 'num', 'regex', and 'term'.
3036 * Documentation continues to be expanded with more API coverage, more
3037 examples, and more in-depth explanations. The guides have been
3038 consolidated into [The Rust Programming Language][trpl].
85aaf69f 3039 * "[Rust By Example][rbe]" is now maintained by the Rust team.
1a4d82fc
JJ
3040 * All official Rust binary installers now come with [Cargo], the
3041 Rust package manager.
3042
3043* Language
3044
3045 * Closures have been [completely redesigned][unboxed] to be
3046 implemented in terms of traits, can now be used as generic type
3047 bounds and thus monomorphized and inlined, or via an opaque
3048 pointer (boxed) as in the old system. The new system is often
3049 referred to as 'unboxed' closures.
3050 * Traits now support [associated types][assoc], allowing families
3051 of related types to be defined together and used generically in
3052 powerful ways.
3053 * Enum variants are [namespaced by their type names][enum].
3054 * [`where` clauses][where] provide a more versatile and attractive
3055 syntax for specifying generic bounds, though the previous syntax
3056 remains valid.
3057 * Rust again picks a [fallback][fb] (either i32 or f64) for uninferred
3058 numeric types.
3059 * Rust [no longer has a runtime][rt] of any description, and only
3060 supports OS threads, not green threads.
3061 * At long last, Rust has been overhauled for 'dynamically-sized
3062 types' ([DST]), which integrates 'fat pointers' (object types,
3063 arrays, and `str`) more deeply into the type system, making it
3064 more consistent.
3065 * Rust now has a general [range syntax][range], `i..j`, `i..`, and
3066 `..j` that produce range types and which, when combined with the
3067 `Index` operator and multidispatch, leads to a convenient slice
3068 notation, `[i..j]`.
3069 * The new range syntax revealed an ambiguity in the fixed-length
3070 array syntax, so now fixed length arrays [are written `[T;
3071 N]`][arrays].
3072 * The `Copy` trait is no longer implemented automatically. Unsafe
3073 pointers no longer implement `Sync` and `Send` so types
3074 containing them don't automatically either. `Sync` and `Send`
3075 are now 'unsafe traits' so one can "forcibly" implement them via
3076 `unsafe impl` if a type confirms to the requirements for them
3077 even though the internals do not (e.g. structs containing unsafe
3078 pointers like `Arc`). These changes are intended to prevent some
3079 footguns and are collectively known as [opt-in built-in
3080 traits][oibit] (though `Sync` and `Send` will soon become pure
3081 library types unknown to the compiler).
3082 * Operator traits now take their operands [by value][ops], and
3083 comparison traits can use multidispatch to compare one type
3084 against multiple other types, allowing e.g. `String` to be
3085 compared with `&str`.
3086 * `if let` and `while let` are no longer feature-gated.
3087 * Rust has adopted a more [uniform syntax for escaping unicode
3088 characters][unicode].
3089 * `macro_rules!` [has been declared stable][mac]. Though it is a
3090 flawed system it is sufficiently popular that it must be usable
3091 for 1.0. Effort has gone into [future-proofing][mac-future] it
3092 in ways that will allow other macro systems to be developed in
3093 parallel, and won't otherwise impact the evolution of the
3094 language.
3095 * The prelude has been [pared back significantly][prelude] such
3096 that it is the minimum necessary to support the most pervasive
3097 code patterns, and through [generalized where clauses][where]
3098 many of the prelude extension traits have been consolidated.
3099 * Rust's rudimentary reflection [has been removed][refl], as it
3100 incurred too much code generation for little benefit.
3101 * [Struct variants][structvars] are no longer feature-gated.
3102 * Trait bounds can be [polymorphic over lifetimes][hrtb]. Also
3103 known as 'higher-ranked trait bounds', this crucially allows
3104 unboxed closures to work.
3105 * Macros invocations surrounded by parens or square brackets and
3106 not terminated by a semicolon are [parsed as
3107 expressions][macros], which makes expressions like `vec![1i32,
3108 2, 3].len()` work as expected.
3109 * Trait objects now implement their traits automatically, and
3110 traits that can be coerced to objects now must be [object
3111 safe][objsafe].
3112 * Automatically deriving traits is now done with `#[derive(...)]`
3113 not `#[deriving(...)]` for [consistency with other naming
3114 conventions][derive].
3115 * Importing the containing module or enum at the same time as
3116 items or variants they contain is [now done with `self` instead
3117 of `mod`][self], as in use `foo::{self, bar}`
3118 * Glob imports are no longer feature-gated.
3119 * The `box` operator and `box` patterns have been feature-gated
3120 pending a redesign. For now unique boxes should be allocated
3121 like other containers, with `Box::new`.
3122
3123* Libraries
3124
3125 * A [series][coll1] of [efforts][coll2] to establish
3126 [conventions][coll3] for collections types has resulted in API
3127 improvements throughout the standard library.
3128 * New [APIs for error handling][err] provide ergonomic interop
3129 between error types, and [new conventions][err-conv] describe
3130 more clearly the recommended error handling strategies in Rust.
3131 * The `fail!` macro has been renamed to [`panic!`][panic] so that
3132 it is easier to discuss failure in the context of error handling
3133 without making clarifications as to whether you are referring to
3134 the 'fail' macro or failure more generally.
3135 * On Linux, `OsRng` prefers the new, more reliable `getrandom`
3136 syscall when available.
3137 * The 'serialize' crate has been renamed 'rustc-serialize' and
3138 moved out of the distribution to Cargo. Although it is widely
62682a34 3139 used now, it is expected to be superseded in the near future.
1a4d82fc
JJ
3140 * The `Show` formatter, typically implemented with
3141 `#[derive(Show)]` is [now requested with the `{:?}`
3142 specifier][show] and is intended for use by all types, for uses
3143 such as `println!` debugging. The new `String` formatter must be
3144 implemented by hand, uses the `{}` specifier, and is intended
3145 for full-fidelity conversions of things that can logically be
3146 represented as strings.
3147
3148* Tooling
3149
3150 * [Flexible target specification][flex] allows rustc's code
3151 generation to be configured to support otherwise-unsupported
3152 platforms.
3153 * Rust comes with rust-gdb and rust-lldb scripts that launch their
3154 respective debuggers with Rust-appropriate pretty-printing.
3155 * The Windows installation of Rust is distributed with the the
3156 MinGW components currently required to link binaries on that
3157 platform.
3158
3159* Misc
3160
3161 * Nullable enum optimizations have been extended to more types so
3162 that e.g. `Option<Vec<T>>` and `Option<String>` take up no more
3163 space than the inner types themselves.
3164 * Work has begun on supporting AArch64.
3165
3166[Cargo]: https://crates.io
3167[unboxed]: http://smallcultfollowing.com/babysteps/blog/2014/11/26/purging-proc/
3168[enum]: https://github.com/rust-lang/rfcs/blob/master/text/0390-enum-namespacing.md
3169[flex]: https://github.com/rust-lang/rfcs/blob/master/text/0131-target-specification.md
3170[err]: https://github.com/rust-lang/rfcs/blob/master/text/0201-error-chaining.md
3171[err-conv]: https://github.com/rust-lang/rfcs/blob/master/text/0236-error-conventions.md
3172[rt]: https://github.com/rust-lang/rfcs/blob/master/text/0230-remove-runtime.md
3173[mac]: https://github.com/rust-lang/rfcs/blob/master/text/0453-macro-reform.md
3174[mac-future]: https://github.com/rust-lang/rfcs/pull/550
3175[DST]: http://smallcultfollowing.com/babysteps/blog/2014/01/05/dst-take-5/
3176[coll1]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md
3177[coll2]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md
3178[coll3]: https://github.com/rust-lang/rfcs/blob/master/text/0216-collection-views.md
3179[ops]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md
3180[prelude]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md
3181[where]: https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md
3182[refl]: https://github.com/rust-lang/rfcs/blob/master/text/0379-remove-reflection.md
3183[panic]: https://github.com/rust-lang/rfcs/blob/master/text/0221-panic.md
3184[structvars]: https://github.com/rust-lang/rfcs/blob/master/text/0418-struct-variants.md
3185[hrtb]: https://github.com/rust-lang/rfcs/blob/master/text/0387-higher-ranked-trait-bounds.md
3186[unicode]: https://github.com/rust-lang/rfcs/blob/master/text/0446-es6-unicode-escapes.md
3187[oibit]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
3188[macros]: https://github.com/rust-lang/rfcs/blob/master/text/0378-expr-macros.md
3189[range]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md#indexing-and-slicing
3190[arrays]: https://github.com/rust-lang/rfcs/blob/master/text/0520-new-array-repeat-syntax.md
3191[show]: https://github.com/rust-lang/rfcs/blob/master/text/0504-show-stabilization.md
3192[derive]: https://github.com/rust-lang/rfcs/blob/master/text/0534-deriving2derive.md
3193[self]: https://github.com/rust-lang/rfcs/blob/master/text/0532-self-in-use.md
3194[fb]: https://github.com/rust-lang/rfcs/blob/master/text/0212-restore-int-fallback.md
3195[objsafe]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
3196[assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
3197[ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871
e9174d1e 3198[trpl]: https://doc.rust-lang.org/book/index.html
85aaf69f 3199[rbe]: http://rustbyexample.com/
1a4d82fc 3200
62682a34 3201
b039eaaf 3202Version 0.12.0 (2014-10-09)
62682a34 3203=============================
1a4d82fc
JJ
3204
3205 * ~1900 changes, numerous bugfixes
3206
3207 * Highlights
3208
3209 * The introductory documentation (now called The Rust Guide) has
3210 been completely rewritten, as have a number of supplementary
3211 guides.
3212 * Rust's package manager, Cargo, continues to improve and is
3213 sometimes considered to be quite awesome.
3214 * Many API's in `std` have been reviewed and updated for
3215 consistency with the in-development Rust coding
3216 guidelines. The standard library documentation tracks
3217 stabilization progress.
3218 * Minor libraries have been moved out-of-tree to the rust-lang org
3219 on GitHub: uuid, semver, glob, num, hexfloat, fourcc. They can
3220 be installed with Cargo.
3221 * Lifetime elision allows lifetime annotations to be left off of
3222 function declarations in many common scenarios.
3223 * Rust now works on 64-bit Windows.
3224
3225 * Language
3226 * Indexing can be overloaded with the `Index` and `IndexMut`
3227 traits.
3228 * The `if let` construct takes a branch only if the `let` pattern
3229 matches, currently behind the 'if_let' feature gate.
3230 * 'where clauses', a more flexible syntax for specifying trait
3231 bounds that is more aesthetic, have been added for traits and
3232 free functions. Where clauses will in the future make it
3233 possible to constrain associated types, which would be
3234 impossible with the existing syntax.
3235 * A new slicing syntax (e.g. `[0..4]`) has been introduced behind
3236 the 'slicing_syntax' feature gate, and can be overloaded with
3237 the `Slice` or `SliceMut` traits.
3238 * The syntax for matching of sub-slices has been changed to use a
3239 postfix `..` instead of prefix (.e.g. `[a, b, c..]`), for
3240 consistency with other uses of `..` and to future-proof
3241 potential additional uses of the syntax.
3242 * The syntax for matching inclusive ranges in patterns has changed
3243 from `0..3` to `0...4` to be consistent with the exclusive range
3244 syntax for slicing.
3245 * Matching of sub-slices in non-tail positions (e.g. `[a.., b,
3246 c]`) has been put behind the 'advanced_slice_patterns' feature
3247 gate and may be removed in the future.
3248 * Components of tuples and tuple structs can be extracted using
3249 the `value.0` syntax, currently behind the `tuple_indexing`
3250 feature gate.
3251 * The `#[crate_id]` attribute is no longer supported; versioning
3252 is handled by the package manager.
3253 * Renaming crate imports are now written `extern crate foo as bar`
3254 instead of `extern crate bar = foo`.
3255 * Renaming use statements are now written `use foo as bar` instead
3256 of `use bar = foo`.
3257 * `let` and `match` bindings and argument names in macros are now
3258 hygienic.
3259 * The new, more efficient, closure types ('unboxed closures') have
3260 been added under a feature gate, 'unboxed_closures'. These will
3261 soon replace the existing closure types, once higher-ranked
3262 trait lifetimes are added to the language.
3263 * `move` has been added as a keyword, for indicating closures
3264 that capture by value.
3265 * Mutation and assignment is no longer allowed in pattern guards.
3266 * Generic structs and enums can now have trait bounds.
3267 * The `Share` trait is now called `Sync` to free up the term
3268 'shared' to refer to 'shared reference' (the default reference
3269 type.
3270 * Dynamically-sized types have been mostly implemented,
3271 unifying the behavior of fat-pointer types with the rest of the
3272 type system.
3273 * As part of dynamically-sized types, the `Sized` trait has been
3274 introduced, which qualifying types implement by default, and
3275 which type parameters expect by default. To specify that a type
3276 parameter does not need to be sized, write `<Sized? T>`. Most
3277 types are `Sized`, notable exceptions being unsized arrays
3278 (`[T]`) and trait types.
3279 * Closures can return `!`, as in `|| -> !` or `proc() -> !`.
3280 * Lifetime bounds can now be applied to type parameters and object
3281 types.
3282 * The old, reference counted GC type, `Gc<T>` which was once
3283 denoted by the `@` sigil, has finally been removed. GC will be
3284 revisited in the future.
3285
3286 * Libraries
3287 * Library documentation has been improved for a number of modules.
3288 * Bit-vectors, collections::bitv has been modernized.
3289 * The url crate is deprecated in favor of
3290 http://github.com/servo/rust-url, which can be installed with
3291 Cargo.
3292 * Most I/O stream types can be cloned and subsequently closed from
3293 a different thread.
3294 * A `std::time::Duration` type has been added for use in I/O
3295 methods that rely on timers, as well as in the 'time' crate's
3296 `Timespec` arithmetic.
3297 * The runtime I/O abstraction layer that enabled the green thread
3298 scheduler to do non-thread-blocking I/O has been removed, along
3299 with the libuv-based implementation employed by the green thread
3300 scheduler. This will greatly simplify the future I/O work.
3301 * `collections::btree` has been rewritten to have a more
3302 idiomatic and efficient design.
3303
3304 * Tooling
3305 * rustdoc output now indicates the stability levels of API's.
3306 * The `--crate-name` flag can specify the name of the crate
3307 being compiled, like `#[crate_name]`.
3308 * The `-C metadata` specifies additional metadata to hash into
3309 symbol names, and `-C extra-filename` specifies additional
3310 information to put into the output filename, for use by the
3311 package manager for versioning.
3312 * debug info generation has continued to improve and should be
3313 more reliable under both gdb and lldb.
3314 * rustc has experimental support for compiling in parallel
3315 using the `-C codegen-units` flag.
3316 * rustc no longer encodes rpath information into binaries by
3317 default.
3318
3319 * Misc
3320 * Stack usage has been optimized with LLVM lifetime annotations.
3321 * Official Rust binaries on Linux are more compatible with older
3322 kernels and distributions, built on CentOS 5.10.
3323
62682a34 3324
b039eaaf 3325Version 0.11.0 (2014-07-02)
62682a34 3326==========================
1a4d82fc
JJ
3327
3328 * ~1700 changes, numerous bugfixes
3329
3330 * Language
3331 * ~[T] has been removed from the language. This type is superseded by
3332 the Vec<T> type.
3333 * ~str has been removed from the language. This type is superseded by
3334 the String type.
3335 * ~T has been removed from the language. This type is superseded by the
3336 Box<T> type.
3337 * @T has been removed from the language. This type is superseded by the
3338 standard library's std::gc::Gc<T> type.
3339 * Struct fields are now all private by default.
3340 * Vector indices and shift amounts are both required to be a `uint`
3341 instead of any integral type.
3342 * Byte character, byte string, and raw byte string literals are now all
3343 supported by prefixing the normal literal with a `b`.
3344 * Multiple ABIs are no longer allowed in an ABI string
3345 * The syntax for lifetimes on closures/procedures has been tweaked
3346 slightly: `<'a>|A, B|: 'b + K -> T`
3347 * Floating point modulus has been removed from the language; however it
3348 is still provided by a library implementation.
3349 * Private enum variants are now disallowed.
3350 * The `priv` keyword has been removed from the language.
3351 * A closure can no longer be invoked through a &-pointer.
3352 * The `use foo, bar, baz;` syntax has been removed from the language.
3353 * The transmute intrinsic no longer works on type parameters.
3354 * Statics now allow blocks/items in their definition.
3355 * Trait bounds are separated from objects with + instead of : now.
3356 * Objects can no longer be read while they are mutably borrowed.
3357 * The address of a static is now marked as insignificant unless the
3358 #[inline(never)] attribute is placed it.
3359 * The #[unsafe_destructor] attribute is now behind a feature gate.
3360 * Struct literals are no longer allowed in ambiguous positions such as
3361 if, while, match, and for..in.
3362 * Declaration of lang items and intrinsics are now feature-gated by
3363 default.
3364 * Integral literals no longer default to `int`, and floating point
3365 literals no longer default to `f64`. Literals must be suffixed with an
3366 appropriate type if inference cannot determine the type of the
3367 literal.
3368 * The Box<T> type is no longer implicitly borrowed to &mut T.
3369 * Procedures are now required to not capture borrowed references.
3370
3371 * Libraries
3372 * The standard library is now a "facade" over a number of underlying
3373 libraries. This means that development on the standard library should
3374 be speeder due to smaller crates, as well as a clearer line between
3375 all dependencies.
3376 * A new library, libcore, lives under the standard library's facade
3377 which is Rust's "0-assumption" library, suitable for embedded and
3378 kernel development for example.
3379 * A regex crate has been added to the standard distribution. This crate
3380 includes statically compiled regular expressions.
3381 * The unwrap/unwrap_err methods on Result require a Show bound for
3382 better error messages.
3383 * The return types of the std::comm primitives have been centralized
3384 around the Result type.
3385 * A number of I/O primitives have gained the ability to time out their
3386 operations.
3387 * A number of I/O primitives have gained the ability to close their
3388 reading/writing halves to cancel pending operations.
3389 * Reverse iterator methods have been removed in favor of `rev()` on
3390 their forward-iteration counterparts.
3391 * A bitflags! macro has been added to enable easy interop with C and
3392 management of bit flags.
3393 * A debug_assert! macro is now provided which is disabled when
3394 `--cfg ndebug` is passed to the compiler.
3395 * A graphviz crate has been added for creating .dot files.
3396 * The std::cast module has been migrated into std::mem.
3397 * The std::local_data api has been migrated from freestanding functions
3398 to being based on methods.
3399 * The Pod trait has been renamed to Copy.
3400 * jemalloc has been added as the default allocator for types.
3401 * The API for allocating memory has been changed to use proper alignment
3402 and sized deallocation
3403 * Connecting a TcpStream or binding a TcpListener is now based on a
3404 string address and a u16 port. This allows connecting to a hostname as
3405 opposed to an IP.
3406 * The Reader trait now contains a core method, read_at_least(), which
3407 correctly handles many repeated 0-length reads.
3408 * The process-spawning API is now centered around a builder-style
3409 Command struct.
3410 * The :? printing qualifier has been moved from the standard library to
3411 an external libdebug crate.
3412 * Eq/Ord have been renamed to PartialEq/PartialOrd. TotalEq/TotalOrd
3413 have been renamed to Eq/Ord.
3414 * The select/plural methods have been removed from format!. The escapes
3415 for { and } have also changed from \{ and \} to {{ and }},
3416 respectively.
3417 * The TaskBuilder API has been re-worked to be a true builder, and
3418 extension traits for spawning native/green tasks have been added.
3419
3420 * Tooling
3421 * All breaking changes to the language or libraries now have their
3422 commit message annotated with `[breaking-change]` to allow for easy
3423 discovery of breaking changes.
3424 * The compiler will now try to suggest how to annotate lifetimes if a
3425 lifetime-related error occurs.
3426 * Debug info continues to be improved greatly with general bug fixes and
3427 better support for situations like link time optimization (LTO).
3428 * Usage of syntax extensions when cross-compiling has been fixed.
3429 * Functionality equivalent to GCC & Clang's -ffunction-sections,
3430 -fdata-sections and --gc-sections has been enabled by default
3431 * The compiler is now stricter about where it will load module files
3432 from when a module is declared via `mod foo;`.
3433 * The #[phase(syntax)] attribute has been renamed to #[phase(plugin)].
3434 Syntax extensions are now discovered via a "plugin registrar" type
3435 which will be extended in the future to other various plugins.
3436 * Lints have been restructured to allow for dynamically loadable lints.
3437 * A number of rustdoc improvements:
3438 * The HTML output has been visually redesigned.
3439 * Markdown is now powered by hoedown instead of sundown.
3440 * Searching heuristics have been greatly improved.
3441 * The search index has been reduced in size by a great amount.
3442 * Cross-crate documentation via `pub use` has been greatly improved.
3443 * Primitive types are now hyperlinked and documented.
3444 * Documentation has been moved from static.rust-lang.org/doc to
3445 doc.rust-lang.org
3446 * A new sandbox, play.rust-lang.org, is available for running and
3447 sharing rust code examples on-line.
3448 * Unused attributes are now more robustly warned about.
3449 * The dead_code lint now warns about unused struct fields.
3450 * Cross-compiling to iOS is now supported.
3451 * Cross-compiling to mipsel is now supported.
3452 * Stability attributes are now inherited by default and no longer apply
3453 to intra-crate usage, only inter-crate usage.
3454 * Error message related to non-exhaustive match expressions have been
3455 greatly improved.
3456
62682a34 3457
b039eaaf 3458Version 0.10 (2014-04-03)
62682a34 3459=========================
1a4d82fc
JJ
3460
3461 * ~1500 changes, numerous bugfixes
3462
3463 * Language
3464 * A new RFC process is now in place for modifying the language.
3465 * Patterns with `@`-pointers have been removed from the language.
3466 * Patterns with unique vectors (`~[T]`) have been removed from the
3467 language.
3468 * Patterns with unique strings (`~str`) have been removed from the
3469 language.
3470 * `@str` has been removed from the language.
3471 * `@[T]` has been removed from the language.
3472 * `@self` has been removed from the language.
3473 * `@Trait` has been removed from the language.
3474 * Headers on `~` allocations which contain `@` boxes inside the type for
3475 reference counting have been removed.
3476 * The semantics around the lifetimes of temporary expressions have changed,
3477 see #3511 and #11585 for more information.
3478 * Cross-crate syntax extensions are now possible, but feature gated. See
3479 #11151 for more information. This includes both `macro_rules!` macros as
3480 well as syntax extensions such as `format!`.
3481 * New lint modes have been added, and older ones have been turned on to be
3482 warn-by-default.
3483 * Unnecessary parentheses
3484 * Uppercase statics
3485 * Camel Case types
3486 * Uppercase variables
3487 * Publicly visible private types
3488 * `#[deriving]` with raw pointers
3489 * Unsafe functions can no longer be coerced to closures.
3490 * Various obscure macros such as `log_syntax!` are now behind feature gates.
3491 * The `#[simd]` attribute is now behind a feature gate.
3492 * Visibility is no longer allowed on `extern crate` statements, and
3493 unnecessary visibility (`priv`) is no longer allowed on `use` statements.
3494 * Trailing commas are now allowed in argument lists and tuple patterns.
3495 * The `do` keyword has been removed, it is now a reserved keyword.
3496 * Default type parameters have been implemented, but are feature gated.
3497 * Borrowed variables through captures in closures are now considered soundly.
3498 * `extern mod` is now `extern crate`
3499 * The `Freeze` trait has been removed.
3500 * The `Share` trait has been added for types that can be shared among
3501 threads.
3502 * Labels in macros are now hygienic.
3503 * Expression/statement macro invocations can be delimited with `{}` now.
3504 * Treatment of types allowed in `static mut` locations has been tweaked.
3505 * The `*` and `.` operators are now overloadable through the `Deref` and
3506 `DerefMut` traits.
3507 * `~Trait` and `proc` no longer have `Send` bounds by default.
3508 * Partial type hints are now supported with the `_` type marker.
3509 * An `Unsafe` type was introduced for interior mutability. It is now
3510 considered undefined to transmute from `&T` to `&mut T` without using the
3511 `Unsafe` type.
3512 * The #[linkage] attribute was implemented for extern statics/functions.
3513 * The inner attribute syntax has changed from `#[foo];` to `#![foo]`.
3514 * `Pod` was renamed to `Copy`.
3515
3516 * Libraries
3517 * The `libextra` library has been removed. It has now been decomposed into
3518 component libraries with smaller and more focused nuggets of
3519 functionality. The full list of libraries can be found on the
3520 documentation index page.
3521 * std: `std::condition` has been removed. All I/O errors are now propagated
3522 through the `Result` type. In order to assist with error handling, a
3523 `try!` macro for unwrapping errors with an early return and a lint for
3524 unused results has been added. See #12039 for more information.
3525 * std: The `vec` module has been renamed to `slice`.
3526 * std: A new vector type, `Vec<T>`, has been added in preparation for DST.
3527 This will become the only growable vector in the future.
3528 * std: `std::io` now has more public-reexports. Types such as `BufferedReader`
3529 are now found at `std::io::BufferedReader` instead of
3530 `std::io::buffered::BufferedReader`.
3531 * std: `print` and `println` are no longer in the prelude, the `print!` and
3532 `println!` macros are intended to be used instead.
3533 * std: `Rc` now has a `Weak` pointer for breaking cycles, and it no longer
3534 attempts to statically prevent cycles.
3535 * std: The standard distribution is adopting the policy of pushing failure
3536 to the user rather than failing in libraries. Many functions (such as
3537 `slice::last()`) now return `Option<T>` instead of `T` + failing.
3538 * std: `fmt::Default` has been renamed to `fmt::Show`, and it now has a new
3539 deriving mode: `#[deriving(Show)]`.
3540 * std: `ToStr` is now implemented for all types implementing `Show`.
3541 * std: The formatting trait methods now take `&self` instead of `&T`
3542 * std: The `invert()` method on iterators has been renamed to `rev()`
3543 * std: `std::num` has seen a reduction in the genericity of its traits,
3544 consolidating functionality into a few core traits.
3545 * std: Backtraces are now printed on task failure if the environment
3546 variable `RUST_BACKTRACE` is present.
3547 * std: Naming conventions for iterators have been standardized. More details
3548 can be found on the wiki's style guide.
3549 * std: `eof()` has been removed from the `Reader` trait. Specific types may
3550 still implement the function.
3551 * std: Networking types are now cloneable to allow simultaneous reads/writes.
3552 * std: `assert_approx_eq!` has been removed
3553 * std: The `e` and `E` formatting specifiers for floats have been added to
3554 print them in exponential notation.
3555 * std: The `Times` trait has been removed
3556 * std: Indications of variance and opting out of builtin bounds is done
3557 through marker types in `std::kinds::marker` now
3558 * std: `hash` has been rewritten, `IterBytes` has been removed, and
3559 `#[deriving(Hash)]` is now possible.
3560 * std: `SharedChan` has been removed, `Sender` is now cloneable.
3561 * std: `Chan` and `Port` were renamed to `Sender` and `Receiver`.
3562 * std: `Chan::new` is now `channel()`.
3563 * std: A new synchronous channel type has been implemented.
3564 * std: A `select!` macro is now provided for selecting over `Receiver`s.
3565 * std: `hashmap` and `trie` have been moved to `libcollections`
3566 * std: `run` has been rolled into `io::process`
3567 * std: `assert_eq!` now uses `{}` instead of `{:?}`
3568 * std: The equality and comparison traits have seen some reorganization.
3569 * std: `rand` has moved to `librand`.
3570 * std: `to_{lower,upper}case` has been implemented for `char`.
3571 * std: Logging has been moved to `liblog`.
3572 * collections: `HashMap` has been rewritten for higher performance and less
3573 memory usage.
3574 * native: The default runtime is now `libnative`. If `libgreen` is desired,
3575 it can be booted manually. The runtime guide has more information and
3576 examples.
3577 * native: All I/O functionality except signals has been implemented.
3578 * green: Task spawning with `libgreen` has been optimized with stack caching
3579 and various trimming of code.
3580 * green: Tasks spawned by `libgreen` now have an unmapped guard page.
3581 * sync: The `extra::sync` module has been updated to modern rust (and moved
3582 to the `sync` library), tweaking and improving various interfaces while
3583 dropping redundant functionality.
3584 * sync: A new `Barrier` type has been added to the `sync` library.
3585 * sync: An efficient mutex for native and green tasks has been implemented.
3586 * serialize: The `base64` module has seen some improvement. It treats
3587 newlines better, has non-string error values, and has seen general
3588 cleanup.
3589 * fourcc: A `fourcc!` macro was introduced
3590 * hexfloat: A `hexfloat!` macro was implemented for specifying floats via a
3591 hexadecimal literal.
3592
3593 * Tooling
3594 * `rustpkg` has been deprecated and removed from the main repository. Its
3595 replacement, `cargo`, is under development.
3596 * Nightly builds of rust are now available
3597 * The memory usage of rustc has been improved many times throughout this
3598 release cycle.
3599 * The build process supports disabling rpath support for the rustc binary
3600 itself.
3601 * Code generation has improved in some cases, giving more information to the
3602 LLVM optimization passes to enable more extensive optimizations.
3603 * Debuginfo compatibility with lldb on OSX has been restored.
3604 * The master branch is now gated on an android bot, making building for
3605 android much more reliable.
3606 * Output flags have been centralized into one `--emit` flag.
3607 * Crate type flags have been centralized into one `--crate-type` flag.
3608 * Codegen flags have been consolidated behind a `-C` flag.
3609 * Linking against outdated crates now has improved error messages.
3610 * Error messages with lifetimes will often suggest how to annotate the
3611 function to fix the error.
3612 * Many more types are documented in the standard library, and new guides
3613 were written.
3614 * Many `rustdoc` improvements:
3615 * code blocks are syntax highlighted.
3616 * render standalone markdown files.
3617 * the --test flag tests all code blocks by default.
3618 * exported macros are displayed.
3619 * reexported types have their documentation inlined at the location of the
3620 first reexport.
3621 * search works across crates that have been rendered to the same output
3622 directory.
3623
62682a34 3624
b039eaaf 3625Version 0.9 (2014-01-09)
62682a34 3626==========================
1a4d82fc
JJ
3627
3628 * ~1800 changes, numerous bugfixes
3629
3630 * Language
3631 * The `float` type has been removed. Use `f32` or `f64` instead.
3632 * A new facility for enabling experimental features (feature gating) has
3633 been added, using the crate-level `#[feature(foo)]` attribute.
3634 * Managed boxes (@) are now behind a feature gate
3635 (`#[feature(managed_boxes)]`) in preparation for future removal. Use the
3636 standard library's `Gc` or `Rc` types instead.
3637 * `@mut` has been removed. Use `std::cell::{Cell, RefCell}` instead.
3638 * Jumping back to the top of a loop is now done with `continue` instead of
3639 `loop`.
3640 * Strings can no longer be mutated through index assignment.
3641 * Raw strings can be created via the basic `r"foo"` syntax or with matched
3642 hash delimiters, as in `r###"foo"###`.
3643 * `~fn` is now written `proc (args) -> retval { ... }` and may only be
3644 called once.
3645 * The `&fn` type is now written `|args| -> ret` to match the literal form.
3646 * `@fn`s have been removed.
3647 * `do` only works with procs in order to make it obvious what the cost
3648 of `do` is.
3649 * Single-element tuple-like structs can no longer be dereferenced to
3650 obtain the inner value. A more comprehensive solution for overloading
3651 the dereference operator will be provided in the future.
3652 * The `#[link(...)]` attribute has been replaced with
3653 `#[crate_id = "name#vers"]`.
3654 * Empty `impl`s must be terminated with empty braces and may not be
3655 terminated with a semicolon.
3656 * Keywords are no longer allowed as lifetime names; the `self` lifetime
3657 no longer has any special meaning.
3658 * The old `fmt!` string formatting macro has been removed.
3659 * `printf!` and `printfln!` (old-style formatting) removed in favor of
3660 `print!` and `println!`.
3661 * `mut` works in patterns now, as in `let (mut x, y) = (1, 2);`.
3662 * The `extern mod foo (name = "bar")` syntax has been removed. Use
3663 `extern mod foo = "bar"` instead.
3664 * New reserved keywords: `alignof`, `offsetof`, `sizeof`.
3665 * Macros can have attributes.
3666 * Macros can expand to items with attributes.
3667 * Macros can expand to multiple items.
3668 * The `asm!` macro is feature-gated (`#[feature(asm)]`).
3669 * Comments may be nested.
3670 * Values automatically coerce to trait objects they implement, without
3671 an explicit `as`.
3672 * Enum discriminants are no longer an entire word but as small as needed to
3673 contain all the variants. The `repr` attribute can be used to override
3674 the discriminant size, as in `#[repr(int)]` for integer-sized, and
3675 `#[repr(C)]` to match C enums.
3676 * Non-string literals are not allowed in attributes (they never worked).
3677 * The FFI now supports variadic functions.
3678 * Octal numeric literals, as in `0o7777`.
3679 * The `concat!` syntax extension performs compile-time string concatenation.
3680 * The `#[fixed_stack_segment]` and `#[rust_stack]` attributes have been
3681 removed as Rust no longer uses segmented stacks.
3682 * Non-ascii identifiers are feature-gated (`#[feature(non_ascii_idents)]`).
3683 * Ignoring all fields of an enum variant or tuple-struct is done with `..`,
3684 not `*`; ignoring remaining fields of a struct is also done with `..`,
3685 not `_`; ignoring a slice of a vector is done with `..`, not `.._`.
3686 * `rustc` supports the "win64" calling convention via `extern "win64"`.
3687 * `rustc` supports the "system" calling convention, which defaults to the
3688 preferred convention for the target platform, "stdcall" on 32-bit Windows,
3689 "C" elsewhere.
3690 * The `type_overflow` lint (default: warn) checks literals for overflow.
3691 * The `unsafe_block` lint (default: allow) checks for usage of `unsafe`.
3692 * The `attribute_usage` lint (default: warn) warns about unknown
3693 attributes.
3694 * The `unknown_features` lint (default: warn) warns about unknown
3695 feature gates.
3696 * The `dead_code` lint (default: warn) checks for dead code.
3697 * Rust libraries can be linked statically to one another
3698 * `#[link_args]` is behind the `link_args` feature gate.
3699 * Native libraries are now linked with `#[link(name = "foo")]`
3700 * Native libraries can be statically linked to a rust crate
3701 (`#[link(name = "foo", kind = "static")]`).
3702 * Native OS X frameworks are now officially supported
3703 (`#[link(name = "foo", kind = "framework")]`).
3704 * The `#[thread_local]` attribute creates thread-local (not task-local)
3705 variables. Currently behind the `thread_local` feature gate.
3706 * The `return` keyword may be used in closures.
3707 * Types that can be copied via a memcpy implement the `Pod` kind.
3708 * The `cfg` attribute can now be used on struct fields and enum variants.
3709
3710 * Libraries
3711 * std: The `option` and `result` API's have been overhauled to make them
3712 simpler, more consistent, and more composable.
3713 * std: The entire `std::io` module has been replaced with one that is
3714 more comprehensive and that properly interfaces with the underlying
3715 scheduler. File, TCP, UDP, Unix sockets, pipes, and timers are all
3716 implemented.
3717 * std: `io::util` contains a number of useful implementations of
3718 `Reader` and `Writer`, including `NullReader`, `NullWriter`,
3719 `ZeroReader`, `TeeReader`.
3720 * std: The reference counted pointer type `extra::rc` moved into std.
3721 * std: The `Gc` type in the `gc` module will replace `@` (it is currently
3722 just a wrapper around it).
3723 * std: The `Either` type has been removed.
3724 * std: `fmt::Default` can be implemented for any type to provide default
3725 formatting to the `format!` macro, as in `format!("{}", myfoo)`.
3726 * std: The `rand` API continues to be tweaked.
3727 * std: The `rust_begin_unwind` function, useful for inserting breakpoints
3728 on failure in gdb, is now named `rust_fail`.
3729 * std: The `each_key` and `each_value` methods on `HashMap` have been
3730 replaced by the `keys` and `values` iterators.
3731 * std: Functions dealing with type size and alignment have moved from the
3732 `sys` module to the `mem` module.
3733 * std: The `path` module was written and API changed.
3734 * std: `str::from_utf8` has been changed to cast instead of allocate.
3735 * std: `starts_with` and `ends_with` methods added to vectors via the
3736 `ImmutableEqVector` trait, which is in the prelude.
3737 * std: Vectors can be indexed with the `get_opt` method, which returns `None`
3738 if the index is out of bounds.
3739 * std: Task failure no longer propagates between tasks, as the model was
3740 complex, expensive, and incompatible with thread-based tasks.
3741 * std: The `Any` type can be used for dynamic typing.
3742 * std: `~Any` can be passed to the `fail!` macro and retrieved via
3743 `task::try`.
3744 * std: Methods that produce iterators generally do not have an `_iter`
3745 suffix now.
3746 * std: `cell::Cell` and `cell::RefCell` can be used to introduce mutability
3747 roots (mutable fields, etc.). Use instead of e.g. `@mut`.
3748 * std: `util::ignore` renamed to `prelude::drop`.
3749 * std: Slices have `sort` and `sort_by` methods via the `MutableVector`
3750 trait.
3751 * std: `vec::raw` has seen a lot of cleanup and API changes.
3752 * std: The standard library no longer includes any C++ code, and very
3753 minimal C, eliminating the dependency on libstdc++.
3754 * std: Runtime scheduling and I/O functionality has been factored out into
3755 extensible interfaces and is now implemented by two different crates:
3756 libnative, for native threading and I/O; and libgreen, for green threading
3757 and I/O. This paves the way for using the standard library in more limited
3758 embedded environments.
3759 * std: The `comm` module has been rewritten to be much faster, have a
3760 simpler, more consistent API, and to work for both native and green
3761 threading.
3762 * std: All libuv dependencies have been moved into the rustuv crate.
3763 * native: New implementations of runtime scheduling on top of OS threads.
3764 * native: New native implementations of TCP, UDP, file I/O, process spawning,
3765 and other I/O.
3766 * green: The green thread scheduler and message passing types are almost
3767 entirely lock-free.
3768 * extra: The `flatpipes` module had bitrotted and was removed.
3769 * extra: All crypto functions have been removed and Rust now has a policy of
3770 not reimplementing crypto in the standard library. In the future crypto
3771 will be provided by external crates with bindings to established libraries.
3772 * extra: `c_vec` has been modernized.
3773 * extra: The `sort` module has been removed. Use the `sort` method on
3774 mutable slices.
3775
3776 * Tooling
3777 * The `rust` and `rusti` commands have been removed, due to lack of
3778 maintenance.
3779 * `rustdoc` was completely rewritten.
3780 * `rustdoc` can test code examples in documentation.
3781 * `rustpkg` can test packages with the argument, 'test'.
3782 * `rustpkg` supports arbitrary dependencies, including C libraries.
3783 * `rustc`'s support for generating debug info is improved again.
3784 * `rustc` has better error reporting for unbalanced delimiters.
3785 * `rustc`'s JIT support was removed due to bitrot.
3786 * Executables and static libraries can be built with LTO (-Z lto)
3787 * `rustc` adds a `--dep-info` flag for communicating dependencies to
3788 build tools.
3789
62682a34 3790
b039eaaf 3791Version 0.8 (2013-09-26)
62682a34 3792============================
1a4d82fc
JJ
3793
3794 * ~2200 changes, numerous bugfixes
3795
3796 * Language
3797 * The `for` loop syntax has changed to work with the `Iterator` trait.
3798 * At long last, unwinding works on Windows.
3799 * Default methods are ready for use.
3800 * Many trait inheritance bugs fixed.
3801 * Owned and borrowed trait objects work more reliably.
3802 * `copy` is no longer a keyword. It has been replaced by the `Clone` trait.
3803 * rustc can omit emission of code for the `debug!` macro if it is passed
3804 `--cfg ndebug`
3805 * mod.rs is now "blessed". When loading `mod foo;`, rustc will now look
3806 for foo.rs, then foo/mod.rs, and will generate an error when both are
3807 present.
3808 * Strings no longer contain trailing nulls. The new `std::c_str` module
3809 provides new mechanisms for converting to C strings.
3810 * The type of foreign functions is now `extern "C" fn` instead of `*u8'.
3811 * The FFI has been overhauled such that foreign functions are called directly,
3812 instead of through a stack-switching wrapper.
3813 * Calling a foreign function must be done through a Rust function with the
3814 `#[fixed_stack_segment]` attribute.
3815 * The `externfn!` macro can be used to declare both a foreign function and
3816 a `#[fixed_stack_segment]` wrapper at once.
3817 * `pub` and `priv` modifiers on `extern` blocks are no longer parsed.
3818 * `unsafe` is no longer allowed on extern fns - they are all unsafe.
3819 * `priv` is disallowed everywhere except for struct fields and enum variants.
3820 * `&T` (besides `&'static T`) is no longer allowed in `@T`.
3821 * `ref` bindings in irrefutable patterns work correctly now.
3822 * `char` is now prevented from containing invalid code points.
3823 * Casting to `bool` is no longer allowed.
3824 * `\0` is now accepted as an escape in chars and strings.
3825 * `yield` is a reserved keyword.
3826 * `typeof` is a reserved keyword.
3827 * Crates may be imported by URL with `extern mod foo = "url";`.
3828 * Explicit enum discriminants may be given as uints as in `enum E { V = 0u }`
3829 * Static vectors can be initialized with repeating elements,
3830 e.g. `static foo: [u8, .. 100]: [0, .. 100];`.
3831 * Static structs can be initialized with functional record update,
3832 e.g. `static foo: Foo = Foo { a: 5, .. bar };`.
3833 * `cfg!` can be used to conditionally execute code based on the crate
3834 configuration, similarly to `#[cfg(...)]`.
3835 * The `unnecessary_qualification` lint detects unneeded module
3836 prefixes (default: allow).
3837 * Arithmetic operations have been implemented on the SIMD types in
3838 `std::unstable::simd`.
3839 * Exchange allocation headers were removed, reducing memory usage.
3840 * `format!` implements a completely new, extensible, and higher-performance
3841 string formatting system. It will replace `fmt!`.
3842 * `print!` and `println!` write formatted strings (using the `format!`
3843 extension) to stdout.
3844 * `write!` and `writeln!` write formatted strings (using the `format!`
3845 extension) to the new Writers in `std::rt::io`.
3846 * The library section in which a function or static is placed may
3847 be specified with `#[link_section = "..."]`.
3848 * The `proto!` syntax extension for defining bounded message protocols
3849 was removed.
3850 * `macro_rules!` is hygienic for `let` declarations.
3851 * The `#[export_name]` attribute specifies the name of a symbol.
3852 * `unreachable!` can be used to indicate unreachable code, and fails
3853 if executed.
3854
3855 * Libraries
3856 * std: Transitioned to the new runtime, written in Rust.
3857 * std: Added an experimental I/O library, `rt::io`, based on the new
3858 runtime.
3859 * std: A new generic `range` function was added to the prelude, replacing
3860 `uint::range` and friends.
3861 * std: `range_rev` no longer exists. Since range is an iterator it can be
3862 reversed with `range(lo, hi).invert()`.
3863 * std: The `chain` method on option renamed to `and_then`; `unwrap_or_default`
3864 renamed to `unwrap_or`.
3865 * std: The `iterator` module was renamed to `iter`.
3866 * std: Integral types now support the `checked_add`, `checked_sub`, and
3867 `checked_mul` operations for detecting overflow.
3868 * std: Many methods in `str`, `vec`, `option, `result` were renamed for
3869 consistency.
3870 * std: Methods are standardizing on conventions for casting methods:
3871 `to_foo` for copying, `into_foo` for moving, `as_foo` for temporary
3872 and cheap casts.
3873 * std: The `CString` type in `c_str` provides new ways to convert to and
3874 from C strings.
3875 * std: `DoubleEndedIterator` can yield elements in two directions.
3876 * std: The `mut_split` method on vectors partitions an `&mut [T]` into
3877 two splices.
3878 * std: `str::from_bytes` renamed to `str::from_utf8`.
3879 * std: `pop_opt` and `shift_opt` methods added to vectors.
3880 * std: The task-local data interface no longer uses @, and keys are
3881 no longer function pointers.
3882 * std: The `swap_unwrap` method of `Option` renamed to `take_unwrap`.
3883 * std: Added `SharedPort` to `comm`.
3884 * std: `Eq` has a default method for `ne`; only `eq` is required
3885 in implementations.
3886 * std: `Ord` has default methods for `le`, `gt` and `ge`; only `lt`
3887 is required in implementations.
3888 * std: `is_utf8` performance is improved, impacting many string functions.
3889 * std: `os::MemoryMap` provides cross-platform mmap.
3890 * std: `ptr::offset` is now unsafe, but also more optimized. Offsets that
3891 are not 'in-bounds' are considered undefined.
3892 * std: Many freestanding functions in `vec` removed in favor of methods.
3893 * std: Many freestanding functions on scalar types removed in favor of
3894 methods.
3895 * std: Many options to task builders were removed since they don't make
3896 sense in the new scheduler design.
3897 * std: More containers implement `FromIterator` so can be created by the
3898 `collect` method.
3899 * std: More complete atomic types in `unstable::atomics`.
3900 * std: `comm::PortSet` removed.
3901 * std: Mutating methods in the `Set` and `Map` traits have been moved into
3902 the `MutableSet` and `MutableMap` traits. `Container::is_empty`,
3903 `Map::contains_key`, `MutableMap::insert`, and `MutableMap::remove` have
3904 default implementations.
3905 * std: Various `from_str` functions were removed in favor of a generic
3906 `from_str` which is available in the prelude.
3907 * std: `util::unreachable` removed in favor of the `unreachable!` macro.
3908 * extra: `dlist`, the doubly-linked list was modernized.
3909 * extra: Added a `hex` module with `ToHex` and `FromHex` traits.
3910 * extra: Added `glob` module, replacing `std::os::glob`.
3911 * extra: `rope` was removed.
3912 * extra: `deque` was renamed to `ringbuf`. `RingBuf` implements `Deque`.
3913 * extra: `net`, and `timer` were removed. The experimental replacements
3914 are `std::rt::io::net` and `std::rt::io::timer`.
3915 * extra: Iterators implemented for `SmallIntMap`.
3916 * extra: Iterators implemented for `Bitv` and `BitvSet`.
3917 * extra: `SmallIntSet` removed. Use `BitvSet`.
3918 * extra: Performance of JSON parsing greatly improved.
3919 * extra: `semver` updated to SemVer 2.0.0.
3920 * extra: `term` handles more terminals correctly.
3921 * extra: `dbg` module removed.
3922 * extra: `par` module removed.
3923 * extra: `future` was cleaned up, with some method renames.
3924 * extra: Most free functions in `getopts` were converted to methods.
3925
3926 * Other
3927 * rustc's debug info generation (`-Z debug-info`) is greatly improved.
3928 * rustc accepts `--target-cpu` to compile to a specific CPU architecture,
3929 similarly to gcc's `--march` flag.
3930 * rustc's performance compiling small crates is much better.
3931 * rustpkg has received many improvements.
3932 * rustpkg supports git tags as package IDs.
3933 * rustpkg builds into target-specific directories so it can be used for
3934 cross-compiling.
3935 * The number of concurrent test tasks is controlled by the environment
3936 variable RUST_TEST_TASKS.
3937 * The test harness can now report metrics for benchmarks.
3938 * All tools have man pages.
3939 * Programs compiled with `--test` now support the `-h` and `--help` flags.
3940 * The runtime uses jemalloc for allocations.
3941 * Segmented stacks are temporarily disabled as part of the transition to
3942 the new runtime. Stack overflows are possible!
3943 * A new documentation backend, rustdoc_ng, is available for use. It is
3944 still invoked through the normal `rustdoc` command.
3945
62682a34 3946
b039eaaf 3947Version 0.7 (2013-07-03)
62682a34 3948=======================
1a4d82fc
JJ
3949
3950 * ~2000 changes, numerous bugfixes
3951
3952 * Language
3953 * `impl`s no longer accept a visibility qualifier. Put them on methods
3954 instead.
3955 * The borrow checker has been rewritten with flow-sensitivity, fixing
3956 many bugs and inconveniences.
3957 * The `self` parameter no longer implicitly means `&'self self`,
3958 and can be explicitly marked with a lifetime.
3959 * Overloadable compound operators (`+=`, etc.) have been temporarily
3960 removed due to bugs.
3961 * The `for` loop protocol now requires `for`-iterators to return `bool`
3962 so they compose better.
3963 * The `Durable` trait is replaced with the `'static` bounds.
3964 * Trait default methods work more often.
3965 * Structs with the `#[packed]` attribute have byte alignment and
3966 no padding between fields.
3967 * Type parameters bound by `Copy` must now be copied explicitly with
3968 the `copy` keyword.
3969 * It is now illegal to move out of a dereferenced unsafe pointer.
3970 * `Option<~T>` is now represented as a nullable pointer.
3971 * `@mut` does dynamic borrow checks correctly.
3972 * The `main` function is only detected at the topmost level of the crate.
3973 The `#[main]` attribute is still valid anywhere.
3974 * Struct fields may no longer be mutable. Use inherited mutability.
3975 * The `#[no_send]` attribute makes a type that would otherwise be
3976 `Send`, not.
3977 * The `#[no_freeze]` attribute makes a type that would otherwise be
3978 `Freeze`, not.
3979 * Unbounded recursion will abort the process after reaching the limit
3980 specified by the `RUST_MAX_STACK` environment variable (default: 1GB).
3981 * The `vecs_implicitly_copyable` lint mode has been removed. Vectors
3982 are never implicitly copyable.
3983 * `#[static_assert]` makes compile-time assertions about static bools.
3984 * At long last, 'argument modes' no longer exist.
3985 * The rarely used `use mod` statement no longer exists.
3986
3987 * Syntax extensions
3988 * `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
3989 argument list.
3990 * `Encodable`, `Decodable`, `Ord`, `TotalOrd`, `TotalEq`, `DeepClone`,
3991 `Rand`, `Zero` and `ToStr` can all be automatically derived with
3992 `#[deriving(...)]`.
3993 * The `bytes!` macro returns a vector of bytes for string, u8, char,
3994 and unsuffixed integer literals.
3995
3996 * Libraries
3997 * The `core` crate was renamed to `std`.
3998 * The `std` crate was renamed to `extra`.
3999 * More and improved documentation.
4000 * std: `iterator` module for external iterator objects.
4001 * Many old-style (internal, higher-order function) iterators replaced by
4002 implementations of `Iterator`.
4003 * std: Many old internal vector and string iterators,
4004 incl. `any`, `all`. removed.
4005 * std: The `finalize` method of `Drop` renamed to `drop`.
4006 * std: The `drop` method now takes `&mut self` instead of `&self`.
4007 * std: The prelude no longer reexports any modules, only types and traits.
4008 * std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
4009 `Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
4010 * std: New numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
4011 `Algebraic`, `Trigonometric`, `Exponential`, `Primitive`.
4012 * std: Tuple traits and accessors defined for up to 12-tuples, e.g.
4013 `(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`.
4014 * std: Many types implement `Clone`.
4015 * std: `path` type renamed to `Path`.
4016 * std: `mut` module and `Mut` type removed.
4017 * std: Many standalone functions removed in favor of methods and iterators
4018 in `vec`, `str`. In the future methods will also work as functions.
4019 * std: `reinterpret_cast` removed. Use `transmute`.
4020 * std: ascii string handling in `std::ascii`.
4021 * std: `Rand` is implemented for ~/@.
4022 * std: `run` module for spawning processes overhauled.
4023 * std: Various atomic types added to `unstable::atomic`.
4024 * std: Various types implement `Zero`.
4025 * std: `LinearMap` and `LinearSet` renamed to `HashMap` and `HashSet`.
4026 * std: Borrowed pointer functions moved from `ptr` to `borrow`.
4027 * std: Added `os::mkdir_recursive`.
4028 * std: Added `os::glob` function performs filesystems globs.
4029 * std: `FuzzyEq` renamed to `ApproxEq`.
4030 * std: `Map` now defines `pop` and `swap` methods.
4031 * std: `Cell` constructors converted to static methods.
4032 * extra: `rc` module adds the reference counted pointers, `Rc` and `RcMut`.
4033 * extra: `flate` module moved from `std` to `extra`.
4034 * extra: `fileinput` module for iterating over a series of files.
4035 * extra: `Complex` number type and `complex` module.
4036 * extra: `Rational` number type and `rational` module.
4037 * extra: `BigInt`, `BigUint` implement numeric and comparison traits.
4038 * extra: `term` uses terminfo now, is more correct.
4039 * extra: `arc` functions converted to methods.
4040 * extra: Implementation of fixed output size variations of SHA-2.
4041
4042 * Tooling
4043 * `unused_variable` lint mode for unused variables (default: warn).
4044 * `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks
4045 (default: warn).
4046 * `unused_mut` lint mode for identifying unused `mut` qualifiers
4047 (default: warn).
4048 * `dead_assignment` lint mode for unread variables (default: warn).
4049 * `unnecessary_allocation` lint mode detects some heap allocations that are
4050 immediately borrowed so could be written without allocating (default: warn).
4051 * `missing_doc` lint mode (default: allow).
4052 * `unreachable_code` lint mode (default: warn).
4053 * The `rusti` command has been rewritten and a number of bugs addressed.
4054 * rustc outputs in color on more terminals.
4055 * rustc accepts a `--link-args` flag to pass arguments to the linker.
4056 * rustc accepts a `-Z print-link-args` flag for debugging linkage.
4057 * Compiling with `-g` will make the binary record information about
4058 dynamic borrowcheck failures for debugging.
4059 * rustdoc has a nicer stylesheet.
4060 * Various improvements to rustdoc.
4061 * Improvements to rustpkg (see the detailed release notes).
4062
62682a34 4063
b039eaaf 4064Version 0.6 (2013-04-03)
62682a34 4065========================
1a4d82fc
JJ
4066
4067 * ~2100 changes, numerous bugfixes
4068
4069 * Syntax changes
4070 * The self type parameter in traits is now spelled `Self`
4071 * The `self` parameter in trait and impl methods must now be explicitly
4072 named (for example: `fn f(&self) { }`). Implicit self is deprecated.
4073 * Static methods no longer require the `static` keyword and instead
4074 are distinguished by the lack of a `self` parameter
4075 * Replaced the `Durable` trait with the `'static` lifetime
4076 * The old closure type syntax with the trailing sigil has been
4077 removed in favor of the more consistent leading sigil
4078 * `super` is a keyword, and may be prefixed to paths
4079 * Trait bounds are separated with `+` instead of whitespace
4080 * Traits are implemented with `impl Trait for Type`
4081 instead of `impl Type: Trait`
4082 * Lifetime syntax is now `&'l foo` instead of `&l/foo`
4083 * The `export` keyword has finally been removed
4084 * The `move` keyword has been removed (see "Semantic changes")
4085 * The interior mutability qualifier on vectors, `[mut T]`, has been
4086 removed. Use `&mut [T]`, etc.
4087 * `mut` is no longer valid in `~mut T`. Use inherited mutability
4088 * `fail` is no longer a keyword. Use `fail!()`
4089 * `assert` is no longer a keyword. Use `assert!()`
4090 * `log` is no longer a keyword. use `debug!`, etc.
4091 * 1-tuples may be represented as `(T,)`
4092 * Struct fields may no longer be `mut`. Use inherited mutability,
4093 `@mut T`, `core::mut` or `core::cell`
4094 * `extern mod { ... }` is no longer valid syntax for foreign
4095 function modules. Use extern blocks: `extern { ... }`
4096 * Newtype enums removed. Use tuple-structs.
4097 * Trait implementations no longer support visibility modifiers
4098 * Pattern matching over vectors improved and expanded
4099 * `const` renamed to `static` to correspond to lifetime name,
4100 and make room for future `static mut` unsafe mutable globals.
4101 * Replaced `#[deriving_eq]` with `#[deriving(Eq)]`, etc.
4102 * `Clone` implementations can be automatically generated with
4103 `#[deriving(Clone)]`
4104 * Casts to traits must use a pointer sigil, e.g. `@foo as @Bar`
4105 instead of `foo as Bar`.
4106 * Fixed length vector types are now written as `[int, .. 3]`
4107 instead of `[int * 3]`.
4108 * Fixed length vector types can express the length as a constant
4109 expression. (ex: `[int, .. GL_BUFFER_SIZE - 2]`)
4110
4111 * Semantic changes
4112 * Types with owned pointers or custom destructors move by default,
4113 eliminating the `move` keyword
4114 * All foreign functions are considered unsafe
4115 * &mut is now unaliasable
4116 * Writes to borrowed @mut pointers are prevented dynamically
4117 * () has size 0
4118 * The name of the main function can be customized using #[main]
4119 * The default type of an inferred closure is &fn instead of @fn
4120 * `use` statements may no longer be "chained" - they cannot import
4121 identifiers imported by previous `use` statements
4122 * `use` statements are crate relative, importing from the "top"
4123 of the crate by default. Paths may be prefixed with `super::`
4124 or `self::` to change the search behavior.
4125 * Method visibility is inherited from the implementation declaration
4126 * Structural records have been removed
4127 * Many more types can be used in static items, including enums
4128 'static-lifetime pointers and vectors
4129 * Pattern matching over vectors improved and expanded
4130 * Typechecking of closure types has been overhauled to
4131 improve inference and eliminate unsoundness
4132 * Macros leave scope at the end of modules, unless that module is
4133 tagged with #[macro_escape]
4134
4135 * Libraries
4136 * Added big integers to `std::bigint`
4137 * Removed `core::oldcomm` module
4138 * Added pipe-based `core::comm` module
4139 * Numeric traits have been reorganized under `core::num`
4140 * `vec::slice` finally returns a slice
4141 * `debug!` and friends don't require a format string, e.g. `debug!(Foo)`
4142 * Containers reorganized around traits in `core::container`
4143 * `core::dvec` removed, `~[T]` is a drop-in replacement
4144 * `core::send_map` renamed to `core::hashmap`
4145 * `std::map` removed; replaced with `core::hashmap`
4146 * `std::treemap` reimplemented as an owned balanced tree
4147 * `std::deque` and `std::smallintmap` reimplemented as owned containers
4148 * `core::trie` added as a fast ordered map for integer keys
4149 * Set types added to `core::hashmap`, `core::trie` and `std::treemap`
4150 * `Ord` split into `Ord` and `TotalOrd`. `Ord` is still used to
4151 overload the comparison operators, whereas `TotalOrd` is used
4152 by certain container types
4153
4154 * Other
4155 * Replaced the 'cargo' package manager with 'rustpkg'
4156 * Added all-purpose 'rust' tool
4157 * `rustc --test` now supports benchmarks with the `#[bench]` attribute
4158 * rustc now *attempts* to offer spelling suggestions
4159 * Improved support for ARM and Android
4160 * Preliminary MIPS backend
4161 * Improved foreign function ABI implementation for x86, x86_64
4162 * Various memory usage improvements
4163 * Rust code may be embedded in foreign code under limited circumstances
4164 * Inline assembler supported by new asm!() syntax extension.
4165
62682a34 4166
b039eaaf 4167Version 0.5 (2012-12-21)
62682a34 4168===========================
1a4d82fc
JJ
4169
4170 * ~900 changes, numerous bugfixes
4171
4172 * Syntax changes
4173 * Removed `<-` move operator
4174 * Completed the transition from the `#fmt` extension syntax to `fmt!`
4175 * Removed old fixed length vector syntax - `[T]/N`
4176 * New token-based quasi-quoters, `quote_tokens!`, `quote_expr!`, etc.
4177 * Macros may now expand to items and statements
4178 * `a.b()` is always parsed as a method call, never as a field projection
4179 * `Eq` and `IterBytes` implementations can be automatically generated
4180 with `#[deriving_eq]` and `#[deriving_iter_bytes]` respectively
4181 * Removed the special crate language for `.rc` files
4182 * Function arguments may consist of any irrefutable pattern
4183
4184 * Semantic changes
4185 * `&` and `~` pointers may point to objects
4186 * Tuple structs - `struct Foo(Bar, Baz)`. Will replace newtype enums.
4187 * Enum variants may be structs
4188 * Destructors can be added to all nominal types with the Drop trait
4189 * Structs and nullary enum variants may be constants
4190 * Values that cannot be implicitly copied are now automatically moved
4191 without writing `move` explicitly
4192 * `&T` may now be coerced to `*T`
4193 * Coercions happen in `let` statements as well as function calls
4194 * `use` statements now take crate-relative paths
4195 * The module and type namespaces have been merged so that static
4196 method names can be resolved under the trait in which they are
4197 declared
4198
4199 * Improved support for language features
4200 * Trait inheritance works in many scenarios
4201 * More support for explicit self arguments in methods - `self`, `&self`
4202 `@self`, and `~self` all generally work as expected
4203 * Static methods work in more situations
4204 * Experimental: Traits may declare default methods for the implementations
4205 to use
4206
4207 * Libraries
4208 * New condition handling system in `core::condition`
4209 * Timsort added to `std::sort`
4210 * New priority queue, `std::priority_queue`
4211 * Pipes for serializable types, `std::flatpipes'
4212 * Serialization overhauled to be trait-based
4213 * Expanded `getopts` definitions
4214 * Moved futures to `std`
4215 * More functions are pure now
4216 * `core::comm` renamed to `oldcomm`. Still deprecated
4217 * `rustdoc` and `cargo` are libraries now
4218
4219 * Misc
4220 * Added a preliminary REPL, `rusti`
4221 * License changed from MIT to dual MIT/APL2
4222
62682a34 4223
b039eaaf 4224Version 0.4 (2012-10-15)
62682a34 4225==========================
1a4d82fc
JJ
4226
4227 * ~2000 changes, numerous bugfixes
4228
4229 * Syntax
4230 * All keywords are now strict and may not be used as identifiers anywhere
4231 * Keyword removal: 'again', 'import', 'check', 'new', 'owned', 'send',
4232 'of', 'with', 'to', 'class'.
4233 * Classes are replaced with simpler structs
4234 * Explicit method self types
4235 * `ret` became `return` and `alt` became `match`
4236 * `import` is now `use`; `use is now `extern mod`
4237 * `extern mod { ... }` is now `extern { ... }`
4238 * `use mod` is the recommended way to import modules
4239 * `pub` and `priv` replace deprecated export lists
4240 * The syntax of `match` pattern arms now uses fat arrow (=>)
4241 * `main` no longer accepts an args vector; use `os::args` instead
4242
4243 * Semantics
4244 * Trait implementations are now coherent, ala Haskell typeclasses
4245 * Trait methods may be static
4246 * Argument modes are deprecated
4247 * Borrowed pointers are much more mature and recommended for use
4248 * Strings and vectors in the static region are stored in constant memory
4249 * Typestate was removed
4250 * Resolution rewritten to be more reliable
4251 * Support for 'dual-mode' data structures (freezing and thawing)
4252
4253 * Libraries
4254 * Most binary operators can now be overloaded via the traits in
4255 `core::ops'
4256 * `std::net::url` for representing URLs
4257 * Sendable hash maps in `core::send_map`
4258 * `core::task' gained a (currently unsafe) task-local storage API
4259
4260 * Concurrency
4261 * An efficient new intertask communication primitive called the pipe,
4262 along with a number of higher-level channel types, in `core::pipes`
4263 * `std::arc`, an atomically reference counted, immutable, shared memory
4264 type
4265 * `std::sync`, various exotic synchronization tools based on arcs and pipes
4266 * Futures are now based on pipes and sendable
4267 * More robust linked task failure
4268 * Improved task builder API
4269
4270 * Other
4271 * Improved error reporting
4272 * Preliminary JIT support
4273 * Preliminary work on precise GC
4274 * Extensive architectural improvements to rustc
4275 * Begun a transition away from buggy C++-based reflection (shape) code to
4276 Rust-based (visitor) code
4277 * All hash functions and tables converted to secure, randomized SipHash
4278
62682a34 4279
b039eaaf 4280Version 0.3 (2012-07-12)
62682a34 4281========================
1a4d82fc
JJ
4282
4283 * ~1900 changes, numerous bugfixes
4284
4285 * New coding conveniences
4286 * Integer-literal suffix inference
4287 * Per-item control over warnings, errors
4288 * #[cfg(windows)] and #[cfg(unix)] attributes
4289 * Documentation comments
4290 * More compact closure syntax
4291 * 'do' expressions for treating higher-order functions as
4292 control structures
4293 * *-patterns (wildcard extended to all constructor fields)
4294
4295 * Semantic cleanup
4296 * Name resolution pass and exhaustiveness checker rewritten
4297 * Region pointers and borrow checking supersede alias
4298 analysis
4299 * Init-ness checking is now provided by a region-based liveness
4300 pass instead of the typestate pass; same for last-use analysis
4301 * Extensive work on region pointers
4302
4303 * Experimental new language features
4304 * Slices and fixed-size, interior-allocated vectors
4305 * #!-comments for lang versioning, shell execution
4306 * Destructors and iface implementation for classes;
4307 type-parameterized classes and class methods
4308 * 'const' type kind for types that can be used to implement
4309 shared-memory concurrency patterns
4310
4311 * Type reflection
4312
4313 * Removal of various obsolete features
4314 * Keywords: 'be', 'prove', 'syntax', 'note', 'mutable', 'bind',
4315 'crust', 'native' (now 'extern'), 'cont' (now 'again')
4316
4317 * Constructs: do-while loops ('do' repurposed), fn binding,
4318 resources (replaced by destructors)
4319
4320 * Compiler reorganization
4321 * Syntax-layer of compiler split into separate crate
4322 * Clang (from LLVM project) integrated into build
4323 * Typechecker split into sub-modules
4324
4325 * New library code
4326 * New time functions
4327 * Extension methods for many built-in types
4328 * Arc: atomic-refcount read-only / exclusive-use shared cells
4329 * Par: parallel map and search routines
4330 * Extensive work on libuv interface
4331 * Much vector code moved to libraries
4332 * Syntax extensions: #line, #col, #file, #mod, #stringify,
4333 #include, #include_str, #include_bin
4334
4335 * Tool improvements
4336 * Cargo automatically resolves dependencies
4337
62682a34 4338
b039eaaf 4339Version 0.2 (2012-03-29)
62682a34 4340=========================
1a4d82fc
JJ
4341
4342 * >1500 changes, numerous bugfixes
4343
4344 * New docs and doc tooling
4345
4346 * New port: FreeBSD x86_64
4347
4348 * Compilation model enhancements
4349 * Generics now specialized, multiply instantiated
4350 * Functions now inlined across separate crates
4351
4352 * Scheduling, stack and threading fixes
4353 * Noticeably improved message-passing performance
4354 * Explicit schedulers
4355 * Callbacks from C
4356 * Helgrind clean
4357
4358 * Experimental new language features
4359 * Operator overloading
4360 * Region pointers
4361 * Classes
4362
4363 * Various language extensions
4364 * C-callback function types: 'crust fn ...'
4365 * Infinite-loop construct: 'loop { ... }'
4366 * Shorten 'mutable' to 'mut'
4367 * Required mutable-local qualifier: 'let mut ...'
4368 * Basic glob-exporting: 'export foo::*;'
4369 * Alt now exhaustive, 'alt check' for runtime-checked
4370 * Block-function form of 'for' loop, with 'break' and 'ret'.
4371
4372 * New library code
4373 * AST quasi-quote syntax extension
4374 * Revived libuv interface
4375 * New modules: core::{future, iter}, std::arena
4376 * Merged per-platform std::{os*, fs*} to core::{libc, os}
4377 * Extensive cleanup, regularization in libstd, libcore
4378
62682a34 4379
b039eaaf 4380Version 0.1 (2012-01-20)
62682a34 4381===============================
1a4d82fc
JJ
4382
4383 * Most language features work, including:
4384 * Unique pointers, unique closures, move semantics
4385 * Interface-constrained generics
4386 * Static interface dispatch
4387 * Stack growth
4388 * Multithread task scheduling
4389 * Typestate predicates
4390 * Failure unwinding, destructors
4391 * Pattern matching and destructuring assignment
4392 * Lightweight block-lambda syntax
4393 * Preliminary macro-by-example
4394
4395 * Compiler works with the following configurations:
4396 * Linux: x86 and x86_64 hosts and targets
4397 * MacOS: x86 and x86_64 hosts and targets
4398 * Windows: x86 hosts and targets
4399
4400 * Cross compilation / multi-target configuration supported.
4401
4402 * Preliminary API-documentation and package-management tools included.
4403
4404Known issues:
4405
4406 * Documentation is incomplete.
4407
4408 * Performance is below intended target.
4409
4410 * Standard library APIs are subject to extensive change, reorganization.
4411
4412 * Language-level versioning is not yet operational - future code will
4413 break unexpectedly.