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