|
| 1 | +Version 1.3.0 (September 2015) |
| 2 | +============================== |
| 3 | + |
| 4 | +* ~900 changes, numerous bugfixes |
| 5 | + |
| 6 | +Highlights |
| 7 | +---------- |
| 8 | + |
| 9 | +* The [new object lifetime defaults][nold] have been [turned |
| 10 | + on][nold2] after a cycle of warnings about the change. Now types |
| 11 | + like `&'a Box<Trait>` (or `&'a Rc<Trait>`, etc) will change from |
| 12 | + being interpreted as `&'a Box<Trait+'a>` to `&'a |
| 13 | + Box<Trait+'static>`. |
| 14 | +* [The Rustonomicon][nom] is a new book in the official documentation |
| 15 | + that dives into writing unsafe Rust. |
| 16 | +* The [`Duration`] API, [has been stabilized][ds]. This basic unit of |
| 17 | + timekeeping is employed by other std APIs, as well as out-of-tree |
| 18 | + time crates. |
| 19 | + |
| 20 | +Breaking Changes |
| 21 | +---------------- |
| 22 | + |
| 23 | +* The [new object lifetime defaults][nold] have been [turned |
| 24 | + on][nold2] after a cycle of warnings about the change. |
| 25 | +* There is a known [regression][lr] in how object lifetime elision is |
| 26 | + interpreted, the proper solution for which is undetermined. |
| 27 | +* The `#[prelude_import]` attribute, an internal implementation |
| 28 | + detail, was accidentally stabilized previously. [It has been put |
| 29 | + behind the `prelude_import` feature gate][pi]. This change is |
| 30 | + believed to break no existing code. |
| 31 | +* The behavior of [`size_of_val`][dst1] and [`align_of_val`][dst2] is |
| 32 | + [more sane for dynamically sized types][dst3]. Code that relied on |
| 33 | + the previous behavior is thought to be broken. |
| 34 | +* The `dropck` rules, which checks that destructors can't access |
| 35 | + destroyed values, [have been updated][dropck] to match the |
| 36 | + [RFC][dropckrfc]. This fixes some soundness holes, and as such will |
| 37 | + cause some previously-compiling code to no longer build. |
| 38 | + |
| 39 | +Language |
| 40 | +-------- |
| 41 | + |
| 42 | +* The [new object lifetime defaults][nold] have been [turned |
| 43 | + on][nold2] after a cycle of warnings about the change. |
| 44 | +* Semicolons may [now follow types and paths in |
| 45 | + macros](https://github.com/rust-lang/rust/pull/27000). |
| 46 | +* The behavior of [`size_of_val`][dst1] and [`align_of_val`][dst2] is |
| 47 | + [more sane for dynamically sized types][dst3]. Code that relied on |
| 48 | + the previous behavior is not known to exist, and suspected to be |
| 49 | + broken. |
| 50 | +* `'static` variables [may now be recursive][st]. |
| 51 | +* `ref` bindings choose between [`Deref`] and [`DerefMut`] |
| 52 | + implementations correctly. |
| 53 | +* The `dropck` rules, which checks that destructors can't access |
| 54 | + destroyed values, [have been updated][dropck] to match the |
| 55 | + [RFC][dropckrfc]. |
| 56 | + |
| 57 | +Libraries |
| 58 | +--------- |
| 59 | + |
| 60 | +* The [`Duration`] API, [has been stabilized][ds], as well as the |
| 61 | + `std::time` module, which presently contains only `Duration`. |
| 62 | +* `Box<str>` and `Box<[T]>` both implement `Clone`. |
| 63 | +* The owned C string, [`CString`], implements [`Borrow`] and the |
| 64 | + borrowed C string, [`CStr`], implements [`ToOwned`]. The two of |
| 65 | + these allow C strings to be borrowed and cloned in generic code. |
| 66 | +* [`CStr`] implements [`Debug`]. |
| 67 | +* [`AtomicPtr`] implements [`Debug`]. |
| 68 | +* [`Error`] trait objects [can be downcast to their concrete types][e] |
| 69 | + in many common configurations, using the [`is`], [`downcast`], |
| 70 | + [`downcast_ref`] and [`downcast_mut`] methods, similarly to the |
| 71 | + [`Any`] trait. |
| 72 | +* Searching for substrings now [employs the two-way algorithm][search] |
| 73 | + instead of doing a naive search. This gives major speedups to a |
| 74 | + number of methods, including [`contains`][sc], [`find`][sf], |
| 75 | + [`rfind`][srf], [`split`][ss]. [`starts_with`][ssw] and |
| 76 | + [`ends_with`][sew] are also faster. |
| 77 | +* The performance of `PartialEq` for slices is [much faster][ps]. |
| 78 | +* The [`Hash`] trait offers the default method, [`hash_slice`], which |
| 79 | + is overridden and optimized by the implementations for scalars. |
| 80 | +* The [`Hasher`] trait now has a number of specialized `write_*` |
| 81 | + methods for primitive types, for efficiency. |
| 82 | +* The I/O-specific error type, [`std::io::Error`][ie], gained a set of |
| 83 | + methods for accessing the 'inner error', if any: [`get_ref`][iegr], |
| 84 | + [`get_mut`][iegm], [`into_inner`][ieii]. As well, the implementation |
| 85 | + of [`std::error::Error::cause`][iec] also delegates to the inner |
| 86 | + error. |
| 87 | +* [`process::Child`][pc] gained the [`id`] method, which returns a |
| 88 | + `u32` representing the platform-specific process identifier. |
| 89 | +* The [`connect`] method on slices is deprecated, replaced by the new |
| 90 | + [`join`] method (note that both of these are on the *unstable* |
| 91 | + [`SliceConcatExt`] trait, but through the magic of the prelude are |
| 92 | + available to stable code anyway). |
| 93 | +* The [`Div`] operator is implemented for [`Wrapping`] types. |
| 94 | +* [`DerefMut` is implemented for `String`][dms]. |
| 95 | +* Performance of SipHash (the default hasher for `HashMap`) is |
| 96 | + [better for long data][sh]. |
| 97 | +* [`AtomicPtr`] implements [`Send`]. |
| 98 | +* The [`read_to_end`] implementations for [`Stdin`] and [`File`] |
| 99 | + are now [specialized to use uninitalized buffers for increased |
| 100 | + performance][rte]. |
| 101 | +* Lifetime parameters of foreign functions [are now resolved |
| 102 | + properly][f]. |
| 103 | + |
| 104 | +Misc |
| 105 | +---- |
| 106 | + |
| 107 | +* Rust can now, with some coercion, [produce programs that run on |
| 108 | + Windows XP][xp], though XP is not considered a supported platform. |
| 109 | +* Porting Rust on Windows from the GNU toolchain to MSVC continues |
| 110 | + ([1][win1], [2][win2], [3][win3], [4][win4]). It is still not |
| 111 | + recommended for use in 1.3, though should be fully-functional |
| 112 | + in the [64-bit 1.4 beta][b14]. |
| 113 | +* On Fedora-based systems installation will [properly configure the |
| 114 | + dynamic linker][fl]. |
| 115 | +* The compiler gained many new extended error descriptions, which can |
| 116 | + be accessed with the `--explain` flag. |
| 117 | +* The `dropck` pass, which checks that destructors can't access |
| 118 | + destroyed values, [has been rewritten][dropck]. This fixes some |
| 119 | + soundness holes, and as such will cause some previously-compiling |
| 120 | + code to no longer build. |
| 121 | +* `rustc` now uses [LLVM to write archive files where possible][ar]. |
| 122 | + Eventually this will eliminate the compiler's dependency on the ar |
| 123 | + utility. |
| 124 | +* Rust has [preliminary support for i686 FreeBSD][fb] (it has long |
| 125 | + supported FreeBSD on x86_64). |
| 126 | +* The [`unused_mut`][lum], [`unconditional_recursion`][lur], |
| 127 | + [`improper_ctypes`][lic], and [`negate_unsigned`][lnu] lints are |
| 128 | + more strict. |
| 129 | +* If landing pads are disabled (with `-Z no-landing-pads`), [`panic!` |
| 130 | + will kill the process instead of leaking][nlp]. |
| 131 | + |
| 132 | +[`Any`]: http://doc.rust-lang.org/nightly/std/any/trait.Any.html |
| 133 | +[`AtomicPtr`]: http://doc.rust-lang.org/nightly/std/sync/atomic/struct.AtomicPtr.html |
| 134 | +[`Borrow`]: http://doc.rust-lang.org/nightly/std/borrow/trait.Borrow.html |
| 135 | +[`CStr`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CStr.html |
| 136 | +[`CString`]: http://doc.rust-lang.org/nightly/std/ffi/struct.CString.html |
| 137 | +[`Debug`]: http://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html |
| 138 | +[`DerefMut`]: http://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html |
| 139 | +[`Deref`]: http://doc.rust-lang.org/nightly/std/ops/trait.Deref.html |
| 140 | +[`Div`]: http://doc.rust-lang.org/nightly/std/ops/trait.Div.html |
| 141 | +[`Duration`]: http://doc.rust-lang.org/nightly/std/time/struct.Duration.html |
| 142 | +[`Error`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html |
| 143 | +[`File`]: http://doc.rust-lang.org/nightly/std/fs/struct.File.html |
| 144 | +[`Hash`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html |
| 145 | +[`Hasher`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html |
| 146 | +[`Send`]: http://doc.rust-lang.org/nightly/std/marker/trait.Send.html |
| 147 | +[`SliceConcatExt`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html |
| 148 | +[`Stdin`]: http://doc.rust-lang.org/nightly/std/io/struct.Stdin.html |
| 149 | +[`ToOwned`]: http://doc.rust-lang.org/nightly/std/borrow/trait.ToOwned.html |
| 150 | +[`Wrapping`]: http://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html |
| 151 | +[`connect`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html#method.connect |
| 152 | +[`downcast_mut`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast_mut |
| 153 | +[`downcast_ref`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast_ref |
| 154 | +[`downcast`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.downcast |
| 155 | +[`hash_slice`]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html#method.hash_slice |
| 156 | +[`id`]: http://doc.rust-lang.org/nightly/std/process/struct.Child.html#method.id |
| 157 | +[`is`]: http://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.is |
| 158 | +[`join`]: http://doc.rust-lang.org/nightly/std/slice/trait.SliceConcatExt.html#method.join |
| 159 | +[`read_to_end`]: http://doc.rust-lang.org/nightly/std/io/trait.Read.html#method.read_to_end |
| 160 | +[ar]: https://github.com/rust-lang/rust/pull/26926 |
| 161 | +[b14]: https://static.rust-lang.org/dist/rust-beta-x86_64-pc-windows-msvc.msi |
| 162 | +[dms]: https://github.com/rust-lang/rust/pull/26241 |
| 163 | +[dropck]: https://github.com/rust-lang/rust/pull/27261 |
| 164 | +[dropckrfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md |
| 165 | +[ds]: https://github.com/rust-lang/rust/pull/26818 |
| 166 | +[dst1]: http://doc.rust-lang.org/nightly/std/mem/fn.size_of_val.html |
| 167 | +[dst2]: http://doc.rust-lang.org/nightly/std/mem/fn.align_of_val.html |
| 168 | +[dst3]: https://github.com/rust-lang/rust/pull/27351 |
| 169 | +[e]: https://github.com/rust-lang/rust/pull/24793 |
| 170 | +[f]: https://github.com/rust-lang/rust/pull/26588 |
| 171 | +[fb]: https://github.com/rust-lang/rust/pull/26959 |
| 172 | +[fl]: https://github.com/rust-lang/rust-installer/pull/41 |
| 173 | +[hs]: http://doc.rust-lang.org/nightly/std/hash/trait.Hash.html#method.hash_slice |
| 174 | +[ie]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html |
| 175 | +[iec]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.cause |
| 176 | +[iegm]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.get_mut |
| 177 | +[iegr]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.get_ref |
| 178 | +[ieii]: http://doc.rust-lang.org/nightly/std/io/struct.Error.html#method.into_inner |
| 179 | +[lic]: https://github.com/rust-lang/rust/pull/26583 |
| 180 | +[lnu]: https://github.com/rust-lang/rust/pull/27026 |
| 181 | +[lr]: https://github.com/rust-lang/rust/issues/27248 |
| 182 | +[lum]: https://github.com/rust-lang/rust/pull/26378 |
| 183 | +[lur]: https://github.com/rust-lang/rust/pull/26783 |
| 184 | +[nlp]: https://github.com/rust-lang/rust/pull/27176 |
| 185 | +[nold2]: https://github.com/rust-lang/rust/pull/27045 |
| 186 | +[nold]: https://github.com/rust-lang/rfcs/blob/master/text/1156-adjust-default-object-bounds.md |
| 187 | +[nom]: http://doc.rust-lang.org/nightly/nomicon/ |
| 188 | +[pc]: http://doc.rust-lang.org/nightly/std/process/struct.Child.html |
| 189 | +[pi]: https://github.com/rust-lang/rust/pull/26699 |
| 190 | +[ps]: https://github.com/rust-lang/rust/pull/26884 |
| 191 | +[rte]: https://github.com/rust-lang/rust/pull/26950 |
| 192 | +[sc]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.contains |
| 193 | +[search]: https://github.com/rust-lang/rust/pull/26327 |
| 194 | +[sew]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.ends_with |
| 195 | +[sf]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.find |
| 196 | +[sh]: https://github.com/rust-lang/rust/pull/27280 |
| 197 | +[srf]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.rfind |
| 198 | +[ss]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.split |
| 199 | +[ssw]: http://doc.rust-lang.org/nightly/std/primitive.str.html#method.starts_with |
| 200 | +[st]: https://github.com/rust-lang/rust/pull/26630 |
| 201 | +[win1]: https://github.com/rust-lang/rust/pull/26569 |
| 202 | +[win2]: https://github.com/rust-lang/rust/pull/26741 |
| 203 | +[win3]: https://github.com/rust-lang/rust/pull/26741 |
| 204 | +[win4]: https://github.com/rust-lang/rust/pull/27210 |
| 205 | +[xp]: https://github.com/rust-lang/rust/pull/26569 |
| 206 | + |
1 | 207 | Version 1.2.0 (August 2015)
|
2 | 208 | ===========================
|
3 | 209 |
|
|
0 commit comments