1 Version 1.3.0 (2015-09-17)
2 ==============================
4 * ~900 changes, numerous bugfixes
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
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
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.
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
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
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
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
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
101 * Lifetime parameters of foreign functions [are now resolved
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
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
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
129 * If landing pads are disabled (with `-Z no-landing-pads`), [`panic!`
130 will kill the process instead of leaking][nlp].
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.Hasher.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
207 Version 1.2.0 (2015-08-07)
208 ==========================
210 * ~1200 changes, numerous bugfixes
215 * [Dynamically-sized-type coercions][dst] allow smart pointer types
216 like `Rc` to contain types without a fixed size, arrays and trait
217 objects, finally enabling use of `Rc<[T]>` and completing the
218 implementation of DST.
219 * [Parallel codegen][parcodegen] is now working again, which can
220 substantially speed up large builds in debug mode; It also gets
221 another ~33% speedup when bootstrapping on a 4 core machine (using 8
222 jobs). It's not enabled by default, but will be "in the near
223 future". It can be activated with the `-C codegen-units=N` flag to
225 * This is the first release with [experimental support for linking
226 with the MSVC linker and lib C on Windows (instead of using the GNU
227 variants via MinGW)][win]. It is yet recommended only for the most
229 * Benchmark compilations are showing a 30% improvement in
230 bootstrapping over 1.1.
235 * The [`to_uppercase`] and [`to_lowercase`] methods on `char` now do
236 unicode case mapping, which is a previously-planned change in
237 behavior and considered a bugfix.
238 * [`mem::align_of`] now specifies [the *minimum alignment* for
239 T][align], which is usually the alignment programs are interested
240 in, and the same value reported by clang's
241 `alignof`. [`mem::min_align_of`] is deprecated. This is not known to
243 * [The `#[packed]` attribute is no longer silently accepted by the
244 compiler][packed]. This attribute did nothing and code that
245 mentioned it likely did not work as intended.
246 * Associated type defaults are [now behind the
247 `associated_type_defaults` feature gate][ad]. In 1.1 associated type
248 defaults *did not work*, but could be mentioned syntactically. As
249 such this breakage has minimal impact.
254 * Patterns with `ref mut` now correctly invoke [`DerefMut`] when
255 matching against dereferencable values.
260 * The [`Extend`] trait, which grows a collection from an iterator, is
261 implemented over iterators of references, for `String`, `Vec`,
262 `LinkedList`, `VecDeque`, `EnumSet`, `BinaryHeap`, `VecMap`,
263 `BTreeSet` and `BTreeMap`. [RFC][extend-rfc].
264 * The [`iter::once`] function returns an iterator that yields a single
265 element, and [`iter::empty`] returns an iterator that yields no
267 * The [`matches`] and [`rmatches`] methods on `str` return iterators
268 over substring matches.
269 * [`Cell`] and [`RefCell`] both implement `Eq`.
270 * A number of methods for wrapping arithmetic are added to the
271 integral types, [`wrapping_div`], [`wrapping_rem`],
272 [`wrapping_neg`], [`wrapping_shl`], [`wrapping_shr`]. These are in
273 addition to the existing [`wrapping_add`], [`wrapping_sub`], and
274 [`wrapping_mul`] methods, and alternatives to the [`Wrapping`]
275 type.. It is illegal for the default arithmetic operations in Rust
276 to overflow; the desire to wrap must be explicit.
277 * The `{:#?}` formatting specifier [displays the alternate,
278 pretty-printed][debugfmt] form of the `Debug` formatter. This
279 feature was actually introduced prior to 1.0 with little
281 * [`fmt::Formatter`] implements [`fmt::Write`], a `fmt`-specific trait
282 for writing data to formatted strings, similar to [`io::Write`].
283 * [`fmt::Formatter`] adds 'debug builder' methods, [`debug_struct`],
284 [`debug_tuple`], [`debug_list`], [`debug_set`], [`debug_map`]. These
285 are used by code generators to emit implementations of [`Debug`].
286 * `str` has new [`to_uppercase`][strup] and [`to_lowercase`][strlow]
287 methods that convert case, following Unicode case mapping.
288 * It is now easier to handle poisoned locks. The [`PoisonError`]
289 type, returned by failing lock operations, exposes `into_inner`,
290 `get_ref`, and `get_mut`, which all give access to the inner lock
291 guard, and allow the poisoned lock to continue to operate. The
292 `is_poisoned` method of [`RwLock`] and [`Mutex`] can poll for a
293 poisoned lock without attempting to take the lock.
294 * On Unix the [`FromRawFd`] trait is implemented for [`Stdio`], and
295 [`AsRawFd`] for [`ChildStdin`], [`ChildStdout`], [`ChildStderr`].
296 On Windows the `FromRawHandle` trait is implemented for `Stdio`,
297 and `AsRawHandle` for `ChildStdin`, `ChildStdout`,
299 * [`io::ErrorKind`] has a new variant, `InvalidData`, which indicates
305 * `rustc` employs smarter heuristics for guessing at [typos].
306 * `rustc` emits more efficient code for [no-op conversions between
307 unsafe pointers][nop].
308 * Fat pointers are now [passed in pairs of immediate arguments][fat],
309 resulting in faster compile times and smaller code.
311 [`Extend`]: https://doc.rust-lang.org/nightly/std/iter/trait.Extend.html
312 [extend-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0839-embrace-extend-extinguish.md
313 [`iter::once`]: https://doc.rust-lang.org/nightly/std/iter/fn.once.html
314 [`iter::empty`]: https://doc.rust-lang.org/nightly/std/iter/fn.empty.html
315 [`matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.matches
316 [`rmatches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.rmatches
317 [`Cell`]: https://doc.rust-lang.org/nightly/std/cell/struct.Cell.html
318 [`RefCell`]: https://doc.rust-lang.org/nightly/std/cell/struct.RefCell.html
319 [`wrapping_add`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_add
320 [`wrapping_sub`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_sub
321 [`wrapping_mul`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_mul
322 [`wrapping_div`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_div
323 [`wrapping_rem`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_rem
324 [`wrapping_neg`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_neg
325 [`wrapping_shl`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shl
326 [`wrapping_shr`]: https://doc.rust-lang.org/nightly/std/primitive.i8.html#method.wrapping_shr
327 [`Wrapping`]: https://doc.rust-lang.org/nightly/std/num/struct.Wrapping.html
328 [`fmt::Formatter`]: https://doc.rust-lang.org/nightly/std/fmt/struct.Formatter.html
329 [`fmt::Write`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Write.html
330 [`io::Write`]: https://doc.rust-lang.org/nightly/std/io/trait.Write.html
331 [`debug_struct`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_struct
332 [`debug_tuple`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_tuple
333 [`debug_list`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_list
334 [`debug_set`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_set
335 [`debug_map`]: https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html#method.debug_map
336 [`Debug`]: https://doc.rust-lang.org/nightly/std/fmt/trait.Debug.html
337 [strup]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_uppercase
338 [strlow]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.to_lowercase
339 [`to_uppercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_uppercase
340 [`to_lowercase`]: https://doc.rust-lang.org/nightly/std/primitive.char.html#method.to_lowercase
341 [`PoisonError`]: https://doc.rust-lang.org/nightly/std/sync/struct.PoisonError.html
342 [`RwLock`]: https://doc.rust-lang.org/nightly/std/sync/struct.RwLock.html
343 [`Mutex`]: https://doc.rust-lang.org/nightly/std/sync/struct.Mutex.html
344 [`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
345 [`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
346 [`Stdio`]: https://doc.rust-lang.org/nightly/std/process/struct.Stdio.html
347 [`ChildStdin`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdin.html
348 [`ChildStdout`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStdout.html
349 [`ChildStderr`]: https://doc.rust-lang.org/nightly/std/process/struct.ChildStderr.html
350 [`io::ErrorKind`]: https://doc.rust-lang.org/nightly/std/io/enum.ErrorKind.html
351 [debugfmt]: https://www.reddit.com/r/rust/comments/3ceaui/psa_produces_prettyprinted_debug_output/
352 [`DerefMut`]: https://doc.rust-lang.org/nightly/std/ops/trait.DerefMut.html
353 [`mem::align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.align_of.html
354 [align]: https://github.com/rust-lang/rust/pull/25646
355 [`mem::min_align_of`]: https://doc.rust-lang.org/nightly/std/mem/fn.min_align_of.html
356 [typos]: https://github.com/rust-lang/rust/pull/26087
357 [nop]: https://github.com/rust-lang/rust/pull/26336
358 [fat]: https://github.com/rust-lang/rust/pull/26411
359 [dst]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
360 [parcodegen]: https://github.com/rust-lang/rust/pull/26018
361 [packed]: https://github.com/rust-lang/rust/pull/25541
362 [ad]: https://github.com/rust-lang/rust/pull/27382
363 [win]: https://github.com/rust-lang/rust/pull/25350
365 Version 1.1.0 (2015-06-25)
366 =========================
368 * ~850 changes, numerous bugfixes
373 * The [`std::fs` module has been expanded][fs] to expand the set of
374 functionality exposed:
375 * `DirEntry` now supports optimizations like `file_type` and `metadata` which
376 don't incur a syscall on some platforms.
377 * A `symlink_metadata` function has been added.
378 * The `fs::Metadata` structure now lowers to its OS counterpart, providing
379 access to all underlying information.
380 * The compiler now contains extended explanations of many errors. When an error
381 with an explanation occurs the compiler suggests using the `--explain` flag
382 to read the explanation. Error explanations are also [available online][err-index].
383 * Thanks to multiple [improvements][sk] to [type checking][pre], as
384 well as other work, the time to bootstrap the compiler decreased by
390 * The [`str::split_whitespace`] method splits a string on unicode
391 whitespace boundaries.
392 * On both Windows and Unix, new extension traits provide conversion of
393 I/O types to and from the underlying system handles. On Unix, these
394 traits are [`FromRawFd`] and [`AsRawFd`], on Windows `FromRawHandle`
395 and `AsRawHandle`. These are implemented for `File`, `TcpStream`,
396 `TcpListener`, and `UpdSocket`. Further implementations for
397 `std::process` will be stabilized later.
398 * On Unix, [`std::os::unix::symlink`] creates symlinks. On
399 Windows, symlinks can be created with
400 `std::os::windows::symlink_dir` and
401 `std::os::windows::symlink_file`.
402 * The `mpsc::Receiver` type can now be converted into an iterator with
403 `into_iter` on the [`IntoIterator`] trait.
404 * `Ipv4Addr` can be created from `u32` with the `From<u32>`
405 implementation of the [`From`] trait.
406 * The `Debug` implementation for `RangeFull` [creates output that is
407 more consistent with other implementations][rf].
408 * [`Debug` is implemented for `File`][file].
409 * The `Default` implementation for `Arc` [no longer requires `Sync +
411 * [The `Iterator` methods `count`, `nth`, and `last` have been
412 overridden for slices to have O(1) performance instead of O(n)][si].
413 * Incorrect handling of paths on Windows has been improved in both the
414 compiler and the standard library.
415 * [`AtomicPtr` gained a `Default` implementation][ap].
416 * In accordance with Rust's policy on arithmetic overflow `abs` now
417 [panics on overflow when debug assertions are enabled][abs].
418 * The [`Cloned`] iterator, which was accidentally left unstable for
419 1.0 [has been stabilized][c].
420 * The [`Incoming`] iterator, which iterates over incoming TCP
421 connections, and which was accidentally unnamable in 1.0, [is now
422 properly exported][inc].
423 * [`BinaryHeap`] no longer corrupts itself [when functions called by
424 `sift_up` or `sift_down` panic][bh].
425 * The [`split_off`] method of `LinkedList` [no longer corrupts
426 the list in certain scenarios][ll].
431 * Type checking performance [has improved notably][sk] with
432 [multiple improvements][pre].
433 * The compiler [suggests code changes][ch] for more errors.
434 * rustc and it's build system have experimental support for [building
435 toolchains against MUSL][m] instead of glibc on Linux.
436 * The compiler defines the `target_env` cfg value, which is used for
437 distinguishing toolchains that are otherwise for the same
438 platform. Presently this is set to `gnu` for common GNU Linux
439 targets and for MinGW targets, and `musl` for MUSL Linux targets.
440 * The [`cargo rustc`][crc] command invokes a build with custom flags
442 * [Android executables are always position independent][pie].
443 * [The `drop_with_repr_extern` lint warns about mixing `repr(C)`
446 [`str::split_whitespace`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.split_whitespace
447 [`FromRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.FromRawFd.html
448 [`AsRawFd`]: https://doc.rust-lang.org/nightly/std/os/unix/io/trait.AsRawFd.html
449 [`std::os::unix::symlink`]: https://doc.rust-lang.org/nightly/std/os/unix/fs/fn.symlink.html
450 [`IntoIterator`]: https://doc.rust-lang.org/nightly/std/iter/trait.IntoIterator.html
451 [`From`]: https://doc.rust-lang.org/nightly/std/convert/trait.From.html
452 [rf]: https://github.com/rust-lang/rust/pull/24491
453 [err-index]: https://doc.rust-lang.org/error-index.html
454 [sk]: https://github.com/rust-lang/rust/pull/24615
455 [pre]: https://github.com/rust-lang/rust/pull/25323
456 [file]: https://github.com/rust-lang/rust/pull/24598
457 [ch]: https://github.com/rust-lang/rust/pull/24683
458 [arc]: https://github.com/rust-lang/rust/pull/24695
459 [si]: https://github.com/rust-lang/rust/pull/24701
460 [ap]: https://github.com/rust-lang/rust/pull/24834
461 [m]: https://github.com/rust-lang/rust/pull/24777
462 [fs]: https://github.com/rust-lang/rfcs/blob/master/text/1044-io-fs-2.1.md
463 [crc]: https://github.com/rust-lang/cargo/pull/1568
464 [pie]: https://github.com/rust-lang/rust/pull/24953
465 [abs]: https://github.com/rust-lang/rust/pull/25441
466 [c]: https://github.com/rust-lang/rust/pull/25496
467 [`Cloned`]: https://doc.rust-lang.org/nightly/std/iter/struct.Cloned.html
468 [`Incoming`]: https://doc.rust-lang.org/nightly/std/net/struct.Incoming.html
469 [inc]: https://github.com/rust-lang/rust/pull/25522
470 [bh]: https://github.com/rust-lang/rust/pull/25856
471 [`BinaryHeap`]: https://doc.rust-lang.org/nightly/std/collections/struct.BinaryHeap.html
472 [ll]: https://github.com/rust-lang/rust/pull/26022
473 [`split_off`]: https://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
474 [drop]: https://github.com/rust-lang/rust/pull/24935
476 Version 1.0.0 (2015-05-15)
477 ========================
479 * ~1500 changes, numerous bugfixes
484 * The vast majority of the standard library is now `#[stable]`. It is
485 no longer possible to use unstable features with a stable build of
487 * Many popular crates on [crates.io] now work on the stable release
489 * Arithmetic on basic integer types now [checks for overflow in debug
495 * Several [restrictions have been added to trait coherence][coh] in
496 order to make it easier for upstream authors to change traits
497 without breaking downstream code.
498 * Digits of binary and octal literals are [lexed more eagerly][lex] to
499 improve error messages and macro behavior. For example, `0b1234` is
500 now lexed as `0b1234` instead of two tokens, `0b1` and `234`.
501 * Trait bounds [are always invariant][inv], eliminating the need for
502 the `PhantomFn` and `MarkerTrait` lang items, which have been
504 * ["-" is no longer a valid character in crate names][cr], the `extern crate
505 "foo" as bar` syntax has been replaced with `extern crate foo as
506 bar`, and Cargo now automatically translates "-" in *package* names
507 to underscore for the crate name.
508 * [Lifetime shadowing is an error][lt].
509 * [`Send` no longer implies `'static`][send-rfc].
510 * [UFCS now supports trait-less associated paths][moar-ufcs] like
512 * Primitive types [now have inherent methods][prim-inherent],
513 obviating the need for extension traits like `SliceExt`.
514 * Methods with `Self: Sized` in their `where` clause are [considered
515 object-safe][self-sized], allowing many extension traits like
516 `IteratorExt` to be merged into the traits they extended.
517 * You can now [refer to associated types][assoc-where] whose
518 corresponding trait bounds appear only in a `where` clause.
519 * The final bits of [OIBIT landed][oibit-final], meaning that traits
520 like `Send` and `Sync` are now library-defined.
521 * A [Reflect trait][reflect] was introduced, which means that
522 downcasting via the `Any` trait is effectively limited to concrete
523 types. This helps retain the potentially-important "parametricity"
524 property: generic code cannot behave differently for different type
525 arguments except in minor ways.
526 * The `unsafe_destructor` feature is now deprecated in favor of the
527 [new `dropck`][dropck]. This change is a major reduction in unsafe
533 * The `thread_local` module [has been renamed to `std::thread`][th].
534 * The methods of `IteratorExt` [have been moved to the `Iterator`
536 * Several traits that implement Rust's conventions for type
537 conversions, `AsMut`, `AsRef`, `From`, and `Into` have been
538 [centralized in the `std::convert` module][con].
539 * The `FromError` trait [was removed in favor of `From`][fe].
540 * The basic sleep function [has moved to
541 `std::thread::sleep_ms`][slp].
542 * The `splitn` function now takes an `n` parameter that represents the
543 number of items yielded by the returned iterator [instead of the
544 number of 'splits'][spl].
545 * [On Unix, all file descriptors are `CLOEXEC` by default][clo].
546 * [Derived implementations of `PartialOrd` now order enums according
547 to their explicitly-assigned discriminants][po].
548 * [Methods for searching strings are generic over `Pattern`s][pat],
549 implemented presently by `&char`, `&str`, `FnMut(char) -> bool` and
551 * [In method resolution, object methods are resolved before inherent
553 * [`String::from_str` has been deprecated in favor of the `From` impl,
555 * [`io::Error` implements `Sync`][ios].
556 * [The `words` method on `&str` has been replaced with
557 `split_whitespace`][sw], to avoid answering the tricky question, 'what is
559 * The new path and IO modules are complete and `#[stable]`. This
560 was the major library focus for this cycle.
561 * The path API was [revised][path-normalize] to normalize `.`,
562 adjusting the tradeoffs in favor of the most common usage.
563 * A large number of remaining APIs in `std` were also stabilized
564 during this cycle; about 75% of the non-deprecated API surface
566 * The new [string pattern API][string-pattern] landed, which makes
567 the string slice API much more internally consistent and flexible.
568 * A new set of [generic conversion traits][conversion] replaced
569 many existing ad hoc traits.
570 * Generic numeric traits were [completely removed][num-traits]. This
571 was made possible thanks to inherent methods for primitive types,
572 and the removal gives maximal flexibility for designing a numeric
573 hierarchy in the future.
574 * The `Fn` traits are now related via [inheritance][fn-inherit]
575 and provide ergonomic [blanket implementations][fn-blanket].
576 * The `Index` and `IndexMut` traits were changed to
577 [take the index by value][index-value], enabling code like
578 `hash_map["string"]` to work.
579 * `Copy` now [inherits][copy-clone] from `Clone`, meaning that all
580 `Copy` data is known to be `Clone` as well.
585 * Many errors now have extended explanations that can be accessed with
586 the `--explain` flag to `rustc`.
587 * Many new examples have been added to the standard library
589 * rustdoc has received a number of improvements focused on completion
591 * Metadata was tuned, shrinking binaries [by 27%][metadata-shrink].
592 * Much headway was made on ecosystem-wide CI, making it possible
593 to [compare builds for breakage][ci-compare].
596 [crates.io]: http://crates.io
597 [clo]: https://github.com/rust-lang/rust/pull/24034
598 [coh]: https://github.com/rust-lang/rfcs/blob/master/text/1023-rebalancing-coherence.md
599 [con]: https://github.com/rust-lang/rust/pull/23875
600 [cr]: https://github.com/rust-lang/rust/pull/23419
601 [fe]: https://github.com/rust-lang/rust/pull/23879
602 [ie]: https://github.com/rust-lang/rust/pull/23300
603 [inv]: https://github.com/rust-lang/rust/pull/23938
604 [ios]: https://github.com/rust-lang/rust/pull/24133
605 [lex]: https://github.com/rust-lang/rfcs/blob/master/text/0879-small-base-lexing.md
606 [lt]: https://github.com/rust-lang/rust/pull/24057
607 [meth]: https://github.com/rust-lang/rust/pull/24056
608 [pat]: https://github.com/rust-lang/rfcs/blob/master/text/0528-string-patterns.md
609 [po]: https://github.com/rust-lang/rust/pull/24270
610 [sf]: https://github.com/rust-lang/rust/pull/24517
611 [slp]: https://github.com/rust-lang/rust/pull/23949
612 [spl]: https://github.com/rust-lang/rfcs/blob/master/text/0979-align-splitn-with-other-languages.md
613 [sw]: https://github.com/rust-lang/rfcs/blob/master/text/1054-str-words.md
614 [th]: https://github.com/rust-lang/rfcs/blob/master/text/0909-move-thread-local-to-std-thread.md
615 [send-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0458-send-improvements.md
616 [moar-ufcs]: https://github.com/rust-lang/rust/pull/22172
617 [prim-inherent]: https://github.com/rust-lang/rust/pull/23104
618 [overflow]: https://github.com/rust-lang/rfcs/blob/master/text/0560-integer-overflow.md
619 [metadata-shrink]: https://github.com/rust-lang/rust/pull/22971
620 [self-sized]: https://github.com/rust-lang/rust/pull/22301
621 [assoc-where]: https://github.com/rust-lang/rust/pull/22512
622 [string-pattern]: https://github.com/rust-lang/rust/pull/22466
623 [oibit-final]: https://github.com/rust-lang/rust/pull/21689
624 [reflect]: https://github.com/rust-lang/rust/pull/23712
625 [conversion]: https://github.com/rust-lang/rfcs/pull/529
626 [num-traits]: https://github.com/rust-lang/rust/pull/23549
627 [index-value]: https://github.com/rust-lang/rust/pull/23601
628 [dropck]: https://github.com/rust-lang/rfcs/pull/769
629 [ci-compare]: https://gist.github.com/brson/a30a77836fbec057cbee
630 [fn-inherit]: https://github.com/rust-lang/rust/pull/23282
631 [fn-blanket]: https://github.com/rust-lang/rust/pull/23895
632 [copy-clone]: https://github.com/rust-lang/rust/pull/23860
633 [path-normalize]: https://github.com/rust-lang/rust/pull/23229
636 Version 1.0.0-alpha.2 (2015-02-20)
637 =====================================
639 * ~1300 changes, numerous bugfixes
643 * The various I/O modules were [overhauled][io-rfc] to reduce
644 unnecessary abstractions and provide better interoperation with
645 the underlying platform. The old `io` module remains temporarily
647 * The standard library now [participates in feature gating][feat],
648 so use of unstable libraries now requires a `#![feature(...)]`
649 attribute. The impact of this change is [described on the
650 forum][feat-forum]. [RFC][feat-rfc].
654 * `for` loops [now operate on the `IntoIterator` trait][into],
655 which eliminates the need to call `.iter()`, etc. to iterate
656 over collections. There are some new subtleties to remember
657 though regarding what sort of iterators various types yield, in
658 particular that `for foo in bar { }` yields values from a move
659 iterator, destroying the original collection. [RFC][into-rfc].
660 * Objects now have [default lifetime bounds][obj], so you don't
661 have to write `Box<Trait+'static>` when you don't care about
662 storing references. [RFC][obj-rfc].
663 * In types that implement `Drop`, [lifetimes must outlive the
664 value][drop]. This will soon make it possible to safely
665 implement `Drop` for types where `#[unsafe_destructor]` is now
666 required. Read the [gorgeous RFC][drop-rfc] for details.
667 * The fully qualified <T as Trait>::X syntax lets you set the Self
668 type for a trait method or associated type. [RFC][ufcs-rfc].
669 * References to types that implement `Deref<U>` now [automatically
670 coerce to references][deref] to the dereferenced type `U`,
671 e.g. `&T where T: Deref<U>` automatically coerces to `&U`. This
672 should eliminate many unsightly uses of `&*`, as when converting
673 from references to vectors into references to
674 slices. [RFC][deref-rfc].
675 * The explicit [closure kind syntax][close] (`|&:|`, `|&mut:|`,
676 `|:|`) is obsolete and closure kind is inferred from context.
677 * [`Self` is a keyword][Self].
681 * The `Show` and `String` formatting traits [have been
682 renamed][fmt] to `Debug` and `Display` to more clearly reflect
683 their related purposes. Automatically getting a string
684 conversion to use with `format!("{:?}", something_to_debug)` is
685 now written `#[derive(Debug)]`.
686 * Abstract [OS-specific string types][osstr], `std::ff::{OsString,
687 OsStr}`, provide strings in platform-specific encodings for easier
688 interop with system APIs. [RFC][osstr-rfc].
689 * The `boxed::into_raw` and `Box::from_raw` functions [convert
690 between `Box<T>` and `*mut T`][boxraw], a common pattern for
691 creating raw pointers.
695 * Certain long error messages of the form 'expected foo found bar'
696 are now [split neatly across multiple
697 lines][multiline]. Examples in the PR.
698 * On Unix Rust can be [uninstalled][un] by running
699 `/usr/local/lib/rustlib/uninstall.sh`.
700 * The `#[rustc_on_unimplemented]` attribute, requiring the
701 'on_unimplemented' feature, lets rustc [display custom error
702 messages when a trait is expected to be implemented for a type
707 * Rust is tested against a [LALR grammar][lalr], which parses
708 almost all the Rust files that rustc does.
710 [boxraw]: https://github.com/rust-lang/rust/pull/21318
711 [close]: https://github.com/rust-lang/rust/pull/21843
712 [deref]: https://github.com/rust-lang/rust/pull/21351
713 [deref-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0241-deref-conversions.md
714 [drop]: https://github.com/rust-lang/rust/pull/21972
715 [drop-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
716 [feat]: https://github.com/rust-lang/rust/pull/21248
717 [feat-forum]: https://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
718 [feat-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
719 [fmt]: https://github.com/rust-lang/rust/pull/21457
720 [into]: https://github.com/rust-lang/rust/pull/20790
721 [into-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md#intoiterator-and-iterable
722 [io-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
723 [lalr]: https://github.com/rust-lang/rust/pull/21452
724 [multiline]: https://github.com/rust-lang/rust/pull/19870
725 [obj]: https://github.com/rust-lang/rust/pull/22230
726 [obj-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0599-default-object-bound.md
727 [onun]: https://github.com/rust-lang/rust/pull/20889
728 [osstr]: https://github.com/rust-lang/rust/pull/21488
729 [osstr-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
730 [Self]: https://github.com/rust-lang/rust/pull/22158
731 [ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
732 [un]: https://github.com/rust-lang/rust/pull/22256
735 Version 1.0.0-alpha (2015-01-09)
736 ==================================
738 * ~2400 changes, numerous bugfixes
742 * The language itself is considered feature complete for 1.0,
743 though there will be many usability improvements and bugfixes
744 before the final release.
745 * Nearly 50% of the public API surface of the standard library has
746 been declared 'stable'. Those interfaces are unlikely to change
748 * The long-running debate over integer types has been
749 [settled][ints]: Rust will ship with types named `isize` and
750 `usize`, rather than `int` and `uint`, for pointer-sized
751 integers. Guidelines will be rolled out during the alpha cycle.
752 * Most crates that are not `std` have been moved out of the Rust
753 distribution into the Cargo ecosystem so they can evolve
754 separately and don't need to be stabilized as quickly, including
755 'time', 'getopts', 'num', 'regex', and 'term'.
756 * Documentation continues to be expanded with more API coverage, more
757 examples, and more in-depth explanations. The guides have been
758 consolidated into [The Rust Programming Language][trpl].
759 * "[Rust By Example][rbe]" is now maintained by the Rust team.
760 * All official Rust binary installers now come with [Cargo], the
761 Rust package manager.
765 * Closures have been [completely redesigned][unboxed] to be
766 implemented in terms of traits, can now be used as generic type
767 bounds and thus monomorphized and inlined, or via an opaque
768 pointer (boxed) as in the old system. The new system is often
769 referred to as 'unboxed' closures.
770 * Traits now support [associated types][assoc], allowing families
771 of related types to be defined together and used generically in
773 * Enum variants are [namespaced by their type names][enum].
774 * [`where` clauses][where] provide a more versatile and attractive
775 syntax for specifying generic bounds, though the previous syntax
777 * Rust again picks a [fallback][fb] (either i32 or f64) for uninferred
779 * Rust [no longer has a runtime][rt] of any description, and only
780 supports OS threads, not green threads.
781 * At long last, Rust has been overhauled for 'dynamically-sized
782 types' ([DST]), which integrates 'fat pointers' (object types,
783 arrays, and `str`) more deeply into the type system, making it
785 * Rust now has a general [range syntax][range], `i..j`, `i..`, and
786 `..j` that produce range types and which, when combined with the
787 `Index` operator and multidispatch, leads to a convenient slice
789 * The new range syntax revealed an ambiguity in the fixed-length
790 array syntax, so now fixed length arrays [are written `[T;
792 * The `Copy` trait is no longer implemented automatically. Unsafe
793 pointers no longer implement `Sync` and `Send` so types
794 containing them don't automatically either. `Sync` and `Send`
795 are now 'unsafe traits' so one can "forcibly" implement them via
796 `unsafe impl` if a type confirms to the requirements for them
797 even though the internals do not (e.g. structs containing unsafe
798 pointers like `Arc`). These changes are intended to prevent some
799 footguns and are collectively known as [opt-in built-in
800 traits][oibit] (though `Sync` and `Send` will soon become pure
801 library types unknown to the compiler).
802 * Operator traits now take their operands [by value][ops], and
803 comparison traits can use multidispatch to compare one type
804 against multiple other types, allowing e.g. `String` to be
805 compared with `&str`.
806 * `if let` and `while let` are no longer feature-gated.
807 * Rust has adopted a more [uniform syntax for escaping unicode
808 characters][unicode].
809 * `macro_rules!` [has been declared stable][mac]. Though it is a
810 flawed system it is sufficiently popular that it must be usable
811 for 1.0. Effort has gone into [future-proofing][mac-future] it
812 in ways that will allow other macro systems to be developed in
813 parallel, and won't otherwise impact the evolution of the
815 * The prelude has been [pared back significantly][prelude] such
816 that it is the minimum necessary to support the most pervasive
817 code patterns, and through [generalized where clauses][where]
818 many of the prelude extension traits have been consolidated.
819 * Rust's rudimentary reflection [has been removed][refl], as it
820 incurred too much code generation for little benefit.
821 * [Struct variants][structvars] are no longer feature-gated.
822 * Trait bounds can be [polymorphic over lifetimes][hrtb]. Also
823 known as 'higher-ranked trait bounds', this crucially allows
824 unboxed closures to work.
825 * Macros invocations surrounded by parens or square brackets and
826 not terminated by a semicolon are [parsed as
827 expressions][macros], which makes expressions like `vec![1i32,
828 2, 3].len()` work as expected.
829 * Trait objects now implement their traits automatically, and
830 traits that can be coerced to objects now must be [object
832 * Automatically deriving traits is now done with `#[derive(...)]`
833 not `#[deriving(...)]` for [consistency with other naming
834 conventions][derive].
835 * Importing the containing module or enum at the same time as
836 items or variants they contain is [now done with `self` instead
837 of `mod`][self], as in use `foo::{self, bar}`
838 * Glob imports are no longer feature-gated.
839 * The `box` operator and `box` patterns have been feature-gated
840 pending a redesign. For now unique boxes should be allocated
841 like other containers, with `Box::new`.
845 * A [series][coll1] of [efforts][coll2] to establish
846 [conventions][coll3] for collections types has resulted in API
847 improvements throughout the standard library.
848 * New [APIs for error handling][err] provide ergonomic interop
849 between error types, and [new conventions][err-conv] describe
850 more clearly the recommended error handling strategies in Rust.
851 * The `fail!` macro has been renamed to [`panic!`][panic] so that
852 it is easier to discuss failure in the context of error handling
853 without making clarifications as to whether you are referring to
854 the 'fail' macro or failure more generally.
855 * On Linux, `OsRng` prefers the new, more reliable `getrandom`
856 syscall when available.
857 * The 'serialize' crate has been renamed 'rustc-serialize' and
858 moved out of the distribution to Cargo. Although it is widely
859 used now, it is expected to be superseded in the near future.
860 * The `Show` formatter, typically implemented with
861 `#[derive(Show)]` is [now requested with the `{:?}`
862 specifier][show] and is intended for use by all types, for uses
863 such as `println!` debugging. The new `String` formatter must be
864 implemented by hand, uses the `{}` specifier, and is intended
865 for full-fidelity conversions of things that can logically be
866 represented as strings.
870 * [Flexible target specification][flex] allows rustc's code
871 generation to be configured to support otherwise-unsupported
873 * Rust comes with rust-gdb and rust-lldb scripts that launch their
874 respective debuggers with Rust-appropriate pretty-printing.
875 * The Windows installation of Rust is distributed with the the
876 MinGW components currently required to link binaries on that
881 * Nullable enum optimizations have been extended to more types so
882 that e.g. `Option<Vec<T>>` and `Option<String>` take up no more
883 space than the inner types themselves.
884 * Work has begun on supporting AArch64.
886 [Cargo]: https://crates.io
887 [unboxed]: http://smallcultfollowing.com/babysteps/blog/2014/11/26/purging-proc/
888 [enum]: https://github.com/rust-lang/rfcs/blob/master/text/0390-enum-namespacing.md
889 [flex]: https://github.com/rust-lang/rfcs/blob/master/text/0131-target-specification.md
890 [err]: https://github.com/rust-lang/rfcs/blob/master/text/0201-error-chaining.md
891 [err-conv]: https://github.com/rust-lang/rfcs/blob/master/text/0236-error-conventions.md
892 [rt]: https://github.com/rust-lang/rfcs/blob/master/text/0230-remove-runtime.md
893 [mac]: https://github.com/rust-lang/rfcs/blob/master/text/0453-macro-reform.md
894 [mac-future]: https://github.com/rust-lang/rfcs/pull/550
895 [DST]: http://smallcultfollowing.com/babysteps/blog/2014/01/05/dst-take-5/
896 [coll1]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md
897 [coll2]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md
898 [coll3]: https://github.com/rust-lang/rfcs/blob/master/text/0216-collection-views.md
899 [ops]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md
900 [prelude]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md
901 [where]: https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md
902 [refl]: https://github.com/rust-lang/rfcs/blob/master/text/0379-remove-reflection.md
903 [panic]: https://github.com/rust-lang/rfcs/blob/master/text/0221-panic.md
904 [structvars]: https://github.com/rust-lang/rfcs/blob/master/text/0418-struct-variants.md
905 [hrtb]: https://github.com/rust-lang/rfcs/blob/master/text/0387-higher-ranked-trait-bounds.md
906 [unicode]: https://github.com/rust-lang/rfcs/blob/master/text/0446-es6-unicode-escapes.md
907 [oibit]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
908 [macros]: https://github.com/rust-lang/rfcs/blob/master/text/0378-expr-macros.md
909 [range]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md#indexing-and-slicing
910 [arrays]: https://github.com/rust-lang/rfcs/blob/master/text/0520-new-array-repeat-syntax.md
911 [show]: https://github.com/rust-lang/rfcs/blob/master/text/0504-show-stabilization.md
912 [derive]: https://github.com/rust-lang/rfcs/blob/master/text/0534-deriving2derive.md
913 [self]: https://github.com/rust-lang/rfcs/blob/master/text/0532-self-in-use.md
914 [fb]: https://github.com/rust-lang/rfcs/blob/master/text/0212-restore-int-fallback.md
915 [objsafe]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
916 [assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
917 [ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871
918 [trpl]: https://doc.rust-lang.org/book/index.html
919 [rbe]: http://rustbyexample.com/
922 Version 0.12.0 (2014-10-09)
923 =============================
925 * ~1900 changes, numerous bugfixes
929 * The introductory documentation (now called The Rust Guide) has
930 been completely rewritten, as have a number of supplementary
932 * Rust's package manager, Cargo, continues to improve and is
933 sometimes considered to be quite awesome.
934 * Many API's in `std` have been reviewed and updated for
935 consistency with the in-development Rust coding
936 guidelines. The standard library documentation tracks
937 stabilization progress.
938 * Minor libraries have been moved out-of-tree to the rust-lang org
939 on GitHub: uuid, semver, glob, num, hexfloat, fourcc. They can
940 be installed with Cargo.
941 * Lifetime elision allows lifetime annotations to be left off of
942 function declarations in many common scenarios.
943 * Rust now works on 64-bit Windows.
946 * Indexing can be overloaded with the `Index` and `IndexMut`
948 * The `if let` construct takes a branch only if the `let` pattern
949 matches, currently behind the 'if_let' feature gate.
950 * 'where clauses', a more flexible syntax for specifying trait
951 bounds that is more aesthetic, have been added for traits and
952 free functions. Where clauses will in the future make it
953 possible to constrain associated types, which would be
954 impossible with the existing syntax.
955 * A new slicing syntax (e.g. `[0..4]`) has been introduced behind
956 the 'slicing_syntax' feature gate, and can be overloaded with
957 the `Slice` or `SliceMut` traits.
958 * The syntax for matching of sub-slices has been changed to use a
959 postfix `..` instead of prefix (.e.g. `[a, b, c..]`), for
960 consistency with other uses of `..` and to future-proof
961 potential additional uses of the syntax.
962 * The syntax for matching inclusive ranges in patterns has changed
963 from `0..3` to `0...4` to be consistent with the exclusive range
965 * Matching of sub-slices in non-tail positions (e.g. `[a.., b,
966 c]`) has been put behind the 'advanced_slice_patterns' feature
967 gate and may be removed in the future.
968 * Components of tuples and tuple structs can be extracted using
969 the `value.0` syntax, currently behind the `tuple_indexing`
971 * The `#[crate_id]` attribute is no longer supported; versioning
972 is handled by the package manager.
973 * Renaming crate imports are now written `extern crate foo as bar`
974 instead of `extern crate bar = foo`.
975 * Renaming use statements are now written `use foo as bar` instead
977 * `let` and `match` bindings and argument names in macros are now
979 * The new, more efficient, closure types ('unboxed closures') have
980 been added under a feature gate, 'unboxed_closures'. These will
981 soon replace the existing closure types, once higher-ranked
982 trait lifetimes are added to the language.
983 * `move` has been added as a keyword, for indicating closures
984 that capture by value.
985 * Mutation and assignment is no longer allowed in pattern guards.
986 * Generic structs and enums can now have trait bounds.
987 * The `Share` trait is now called `Sync` to free up the term
988 'shared' to refer to 'shared reference' (the default reference
990 * Dynamically-sized types have been mostly implemented,
991 unifying the behavior of fat-pointer types with the rest of the
993 * As part of dynamically-sized types, the `Sized` trait has been
994 introduced, which qualifying types implement by default, and
995 which type parameters expect by default. To specify that a type
996 parameter does not need to be sized, write `<Sized? T>`. Most
997 types are `Sized`, notable exceptions being unsized arrays
998 (`[T]`) and trait types.
999 * Closures can return `!`, as in `|| -> !` or `proc() -> !`.
1000 * Lifetime bounds can now be applied to type parameters and object
1002 * The old, reference counted GC type, `Gc<T>` which was once
1003 denoted by the `@` sigil, has finally been removed. GC will be
1004 revisited in the future.
1007 * Library documentation has been improved for a number of modules.
1008 * Bit-vectors, collections::bitv has been modernized.
1009 * The url crate is deprecated in favor of
1010 http://github.com/servo/rust-url, which can be installed with
1012 * Most I/O stream types can be cloned and subsequently closed from
1014 * A `std::time::Duration` type has been added for use in I/O
1015 methods that rely on timers, as well as in the 'time' crate's
1016 `Timespec` arithmetic.
1017 * The runtime I/O abstraction layer that enabled the green thread
1018 scheduler to do non-thread-blocking I/O has been removed, along
1019 with the libuv-based implementation employed by the green thread
1020 scheduler. This will greatly simplify the future I/O work.
1021 * `collections::btree` has been rewritten to have a more
1022 idiomatic and efficient design.
1025 * rustdoc output now indicates the stability levels of API's.
1026 * The `--crate-name` flag can specify the name of the crate
1027 being compiled, like `#[crate_name]`.
1028 * The `-C metadata` specifies additional metadata to hash into
1029 symbol names, and `-C extra-filename` specifies additional
1030 information to put into the output filename, for use by the
1031 package manager for versioning.
1032 * debug info generation has continued to improve and should be
1033 more reliable under both gdb and lldb.
1034 * rustc has experimental support for compiling in parallel
1035 using the `-C codegen-units` flag.
1036 * rustc no longer encodes rpath information into binaries by
1040 * Stack usage has been optimized with LLVM lifetime annotations.
1041 * Official Rust binaries on Linux are more compatible with older
1042 kernels and distributions, built on CentOS 5.10.
1045 Version 0.11.0 (2014-07-02)
1046 ==========================
1048 * ~1700 changes, numerous bugfixes
1051 * ~[T] has been removed from the language. This type is superseded by
1053 * ~str has been removed from the language. This type is superseded by
1055 * ~T has been removed from the language. This type is superseded by the
1057 * @T has been removed from the language. This type is superseded by the
1058 standard library's std::gc::Gc<T> type.
1059 * Struct fields are now all private by default.
1060 * Vector indices and shift amounts are both required to be a `uint`
1061 instead of any integral type.
1062 * Byte character, byte string, and raw byte string literals are now all
1063 supported by prefixing the normal literal with a `b`.
1064 * Multiple ABIs are no longer allowed in an ABI string
1065 * The syntax for lifetimes on closures/procedures has been tweaked
1066 slightly: `<'a>|A, B|: 'b + K -> T`
1067 * Floating point modulus has been removed from the language; however it
1068 is still provided by a library implementation.
1069 * Private enum variants are now disallowed.
1070 * The `priv` keyword has been removed from the language.
1071 * A closure can no longer be invoked through a &-pointer.
1072 * The `use foo, bar, baz;` syntax has been removed from the language.
1073 * The transmute intrinsic no longer works on type parameters.
1074 * Statics now allow blocks/items in their definition.
1075 * Trait bounds are separated from objects with + instead of : now.
1076 * Objects can no longer be read while they are mutably borrowed.
1077 * The address of a static is now marked as insignificant unless the
1078 #[inline(never)] attribute is placed it.
1079 * The #[unsafe_destructor] attribute is now behind a feature gate.
1080 * Struct literals are no longer allowed in ambiguous positions such as
1081 if, while, match, and for..in.
1082 * Declaration of lang items and intrinsics are now feature-gated by
1084 * Integral literals no longer default to `int`, and floating point
1085 literals no longer default to `f64`. Literals must be suffixed with an
1086 appropriate type if inference cannot determine the type of the
1088 * The Box<T> type is no longer implicitly borrowed to &mut T.
1089 * Procedures are now required to not capture borrowed references.
1092 * The standard library is now a "facade" over a number of underlying
1093 libraries. This means that development on the standard library should
1094 be speeder due to smaller crates, as well as a clearer line between
1096 * A new library, libcore, lives under the standard library's facade
1097 which is Rust's "0-assumption" library, suitable for embedded and
1098 kernel development for example.
1099 * A regex crate has been added to the standard distribution. This crate
1100 includes statically compiled regular expressions.
1101 * The unwrap/unwrap_err methods on Result require a Show bound for
1102 better error messages.
1103 * The return types of the std::comm primitives have been centralized
1104 around the Result type.
1105 * A number of I/O primitives have gained the ability to time out their
1107 * A number of I/O primitives have gained the ability to close their
1108 reading/writing halves to cancel pending operations.
1109 * Reverse iterator methods have been removed in favor of `rev()` on
1110 their forward-iteration counterparts.
1111 * A bitflags! macro has been added to enable easy interop with C and
1112 management of bit flags.
1113 * A debug_assert! macro is now provided which is disabled when
1114 `--cfg ndebug` is passed to the compiler.
1115 * A graphviz crate has been added for creating .dot files.
1116 * The std::cast module has been migrated into std::mem.
1117 * The std::local_data api has been migrated from freestanding functions
1118 to being based on methods.
1119 * The Pod trait has been renamed to Copy.
1120 * jemalloc has been added as the default allocator for types.
1121 * The API for allocating memory has been changed to use proper alignment
1122 and sized deallocation
1123 * Connecting a TcpStream or binding a TcpListener is now based on a
1124 string address and a u16 port. This allows connecting to a hostname as
1126 * The Reader trait now contains a core method, read_at_least(), which
1127 correctly handles many repeated 0-length reads.
1128 * The process-spawning API is now centered around a builder-style
1130 * The :? printing qualifier has been moved from the standard library to
1131 an external libdebug crate.
1132 * Eq/Ord have been renamed to PartialEq/PartialOrd. TotalEq/TotalOrd
1133 have been renamed to Eq/Ord.
1134 * The select/plural methods have been removed from format!. The escapes
1135 for { and } have also changed from \{ and \} to {{ and }},
1137 * The TaskBuilder API has been re-worked to be a true builder, and
1138 extension traits for spawning native/green tasks have been added.
1141 * All breaking changes to the language or libraries now have their
1142 commit message annotated with `[breaking-change]` to allow for easy
1143 discovery of breaking changes.
1144 * The compiler will now try to suggest how to annotate lifetimes if a
1145 lifetime-related error occurs.
1146 * Debug info continues to be improved greatly with general bug fixes and
1147 better support for situations like link time optimization (LTO).
1148 * Usage of syntax extensions when cross-compiling has been fixed.
1149 * Functionality equivalent to GCC & Clang's -ffunction-sections,
1150 -fdata-sections and --gc-sections has been enabled by default
1151 * The compiler is now stricter about where it will load module files
1152 from when a module is declared via `mod foo;`.
1153 * The #[phase(syntax)] attribute has been renamed to #[phase(plugin)].
1154 Syntax extensions are now discovered via a "plugin registrar" type
1155 which will be extended in the future to other various plugins.
1156 * Lints have been restructured to allow for dynamically loadable lints.
1157 * A number of rustdoc improvements:
1158 * The HTML output has been visually redesigned.
1159 * Markdown is now powered by hoedown instead of sundown.
1160 * Searching heuristics have been greatly improved.
1161 * The search index has been reduced in size by a great amount.
1162 * Cross-crate documentation via `pub use` has been greatly improved.
1163 * Primitive types are now hyperlinked and documented.
1164 * Documentation has been moved from static.rust-lang.org/doc to
1166 * A new sandbox, play.rust-lang.org, is available for running and
1167 sharing rust code examples on-line.
1168 * Unused attributes are now more robustly warned about.
1169 * The dead_code lint now warns about unused struct fields.
1170 * Cross-compiling to iOS is now supported.
1171 * Cross-compiling to mipsel is now supported.
1172 * Stability attributes are now inherited by default and no longer apply
1173 to intra-crate usage, only inter-crate usage.
1174 * Error message related to non-exhaustive match expressions have been
1178 Version 0.10 (2014-04-03)
1179 =========================
1181 * ~1500 changes, numerous bugfixes
1184 * A new RFC process is now in place for modifying the language.
1185 * Patterns with `@`-pointers have been removed from the language.
1186 * Patterns with unique vectors (`~[T]`) have been removed from the
1188 * Patterns with unique strings (`~str`) have been removed from the
1190 * `@str` has been removed from the language.
1191 * `@[T]` has been removed from the language.
1192 * `@self` has been removed from the language.
1193 * `@Trait` has been removed from the language.
1194 * Headers on `~` allocations which contain `@` boxes inside the type for
1195 reference counting have been removed.
1196 * The semantics around the lifetimes of temporary expressions have changed,
1197 see #3511 and #11585 for more information.
1198 * Cross-crate syntax extensions are now possible, but feature gated. See
1199 #11151 for more information. This includes both `macro_rules!` macros as
1200 well as syntax extensions such as `format!`.
1201 * New lint modes have been added, and older ones have been turned on to be
1203 * Unnecessary parentheses
1206 * Uppercase variables
1207 * Publicly visible private types
1208 * `#[deriving]` with raw pointers
1209 * Unsafe functions can no longer be coerced to closures.
1210 * Various obscure macros such as `log_syntax!` are now behind feature gates.
1211 * The `#[simd]` attribute is now behind a feature gate.
1212 * Visibility is no longer allowed on `extern crate` statements, and
1213 unnecessary visibility (`priv`) is no longer allowed on `use` statements.
1214 * Trailing commas are now allowed in argument lists and tuple patterns.
1215 * The `do` keyword has been removed, it is now a reserved keyword.
1216 * Default type parameters have been implemented, but are feature gated.
1217 * Borrowed variables through captures in closures are now considered soundly.
1218 * `extern mod` is now `extern crate`
1219 * The `Freeze` trait has been removed.
1220 * The `Share` trait has been added for types that can be shared among
1222 * Labels in macros are now hygienic.
1223 * Expression/statement macro invocations can be delimited with `{}` now.
1224 * Treatment of types allowed in `static mut` locations has been tweaked.
1225 * The `*` and `.` operators are now overloadable through the `Deref` and
1227 * `~Trait` and `proc` no longer have `Send` bounds by default.
1228 * Partial type hints are now supported with the `_` type marker.
1229 * An `Unsafe` type was introduced for interior mutability. It is now
1230 considered undefined to transmute from `&T` to `&mut T` without using the
1232 * The #[linkage] attribute was implemented for extern statics/functions.
1233 * The inner attribute syntax has changed from `#[foo];` to `#![foo]`.
1234 * `Pod` was renamed to `Copy`.
1237 * The `libextra` library has been removed. It has now been decomposed into
1238 component libraries with smaller and more focused nuggets of
1239 functionality. The full list of libraries can be found on the
1240 documentation index page.
1241 * std: `std::condition` has been removed. All I/O errors are now propagated
1242 through the `Result` type. In order to assist with error handling, a
1243 `try!` macro for unwrapping errors with an early return and a lint for
1244 unused results has been added. See #12039 for more information.
1245 * std: The `vec` module has been renamed to `slice`.
1246 * std: A new vector type, `Vec<T>`, has been added in preparation for DST.
1247 This will become the only growable vector in the future.
1248 * std: `std::io` now has more public-reexports. Types such as `BufferedReader`
1249 are now found at `std::io::BufferedReader` instead of
1250 `std::io::buffered::BufferedReader`.
1251 * std: `print` and `println` are no longer in the prelude, the `print!` and
1252 `println!` macros are intended to be used instead.
1253 * std: `Rc` now has a `Weak` pointer for breaking cycles, and it no longer
1254 attempts to statically prevent cycles.
1255 * std: The standard distribution is adopting the policy of pushing failure
1256 to the user rather than failing in libraries. Many functions (such as
1257 `slice::last()`) now return `Option<T>` instead of `T` + failing.
1258 * std: `fmt::Default` has been renamed to `fmt::Show`, and it now has a new
1259 deriving mode: `#[deriving(Show)]`.
1260 * std: `ToStr` is now implemented for all types implementing `Show`.
1261 * std: The formatting trait methods now take `&self` instead of `&T`
1262 * std: The `invert()` method on iterators has been renamed to `rev()`
1263 * std: `std::num` has seen a reduction in the genericity of its traits,
1264 consolidating functionality into a few core traits.
1265 * std: Backtraces are now printed on task failure if the environment
1266 variable `RUST_BACKTRACE` is present.
1267 * std: Naming conventions for iterators have been standardized. More details
1268 can be found on the wiki's style guide.
1269 * std: `eof()` has been removed from the `Reader` trait. Specific types may
1270 still implement the function.
1271 * std: Networking types are now cloneable to allow simultaneous reads/writes.
1272 * std: `assert_approx_eq!` has been removed
1273 * std: The `e` and `E` formatting specifiers for floats have been added to
1274 print them in exponential notation.
1275 * std: The `Times` trait has been removed
1276 * std: Indications of variance and opting out of builtin bounds is done
1277 through marker types in `std::kinds::marker` now
1278 * std: `hash` has been rewritten, `IterBytes` has been removed, and
1279 `#[deriving(Hash)]` is now possible.
1280 * std: `SharedChan` has been removed, `Sender` is now cloneable.
1281 * std: `Chan` and `Port` were renamed to `Sender` and `Receiver`.
1282 * std: `Chan::new` is now `channel()`.
1283 * std: A new synchronous channel type has been implemented.
1284 * std: A `select!` macro is now provided for selecting over `Receiver`s.
1285 * std: `hashmap` and `trie` have been moved to `libcollections`
1286 * std: `run` has been rolled into `io::process`
1287 * std: `assert_eq!` now uses `{}` instead of `{:?}`
1288 * std: The equality and comparison traits have seen some reorganization.
1289 * std: `rand` has moved to `librand`.
1290 * std: `to_{lower,upper}case` has been implemented for `char`.
1291 * std: Logging has been moved to `liblog`.
1292 * collections: `HashMap` has been rewritten for higher performance and less
1294 * native: The default runtime is now `libnative`. If `libgreen` is desired,
1295 it can be booted manually. The runtime guide has more information and
1297 * native: All I/O functionality except signals has been implemented.
1298 * green: Task spawning with `libgreen` has been optimized with stack caching
1299 and various trimming of code.
1300 * green: Tasks spawned by `libgreen` now have an unmapped guard page.
1301 * sync: The `extra::sync` module has been updated to modern rust (and moved
1302 to the `sync` library), tweaking and improving various interfaces while
1303 dropping redundant functionality.
1304 * sync: A new `Barrier` type has been added to the `sync` library.
1305 * sync: An efficient mutex for native and green tasks has been implemented.
1306 * serialize: The `base64` module has seen some improvement. It treats
1307 newlines better, has non-string error values, and has seen general
1309 * fourcc: A `fourcc!` macro was introduced
1310 * hexfloat: A `hexfloat!` macro was implemented for specifying floats via a
1311 hexadecimal literal.
1314 * `rustpkg` has been deprecated and removed from the main repository. Its
1315 replacement, `cargo`, is under development.
1316 * Nightly builds of rust are now available
1317 * The memory usage of rustc has been improved many times throughout this
1319 * The build process supports disabling rpath support for the rustc binary
1321 * Code generation has improved in some cases, giving more information to the
1322 LLVM optimization passes to enable more extensive optimizations.
1323 * Debuginfo compatibility with lldb on OSX has been restored.
1324 * The master branch is now gated on an android bot, making building for
1325 android much more reliable.
1326 * Output flags have been centralized into one `--emit` flag.
1327 * Crate type flags have been centralized into one `--crate-type` flag.
1328 * Codegen flags have been consolidated behind a `-C` flag.
1329 * Linking against outdated crates now has improved error messages.
1330 * Error messages with lifetimes will often suggest how to annotate the
1331 function to fix the error.
1332 * Many more types are documented in the standard library, and new guides
1334 * Many `rustdoc` improvements:
1335 * code blocks are syntax highlighted.
1336 * render standalone markdown files.
1337 * the --test flag tests all code blocks by default.
1338 * exported macros are displayed.
1339 * reexported types have their documentation inlined at the location of the
1341 * search works across crates that have been rendered to the same output
1345 Version 0.9 (2014-01-09)
1346 ==========================
1348 * ~1800 changes, numerous bugfixes
1351 * The `float` type has been removed. Use `f32` or `f64` instead.
1352 * A new facility for enabling experimental features (feature gating) has
1353 been added, using the crate-level `#[feature(foo)]` attribute.
1354 * Managed boxes (@) are now behind a feature gate
1355 (`#[feature(managed_boxes)]`) in preparation for future removal. Use the
1356 standard library's `Gc` or `Rc` types instead.
1357 * `@mut` has been removed. Use `std::cell::{Cell, RefCell}` instead.
1358 * Jumping back to the top of a loop is now done with `continue` instead of
1360 * Strings can no longer be mutated through index assignment.
1361 * Raw strings can be created via the basic `r"foo"` syntax or with matched
1362 hash delimiters, as in `r###"foo"###`.
1363 * `~fn` is now written `proc (args) -> retval { ... }` and may only be
1365 * The `&fn` type is now written `|args| -> ret` to match the literal form.
1366 * `@fn`s have been removed.
1367 * `do` only works with procs in order to make it obvious what the cost
1369 * Single-element tuple-like structs can no longer be dereferenced to
1370 obtain the inner value. A more comprehensive solution for overloading
1371 the dereference operator will be provided in the future.
1372 * The `#[link(...)]` attribute has been replaced with
1373 `#[crate_id = "name#vers"]`.
1374 * Empty `impl`s must be terminated with empty braces and may not be
1375 terminated with a semicolon.
1376 * Keywords are no longer allowed as lifetime names; the `self` lifetime
1377 no longer has any special meaning.
1378 * The old `fmt!` string formatting macro has been removed.
1379 * `printf!` and `printfln!` (old-style formatting) removed in favor of
1380 `print!` and `println!`.
1381 * `mut` works in patterns now, as in `let (mut x, y) = (1, 2);`.
1382 * The `extern mod foo (name = "bar")` syntax has been removed. Use
1383 `extern mod foo = "bar"` instead.
1384 * New reserved keywords: `alignof`, `offsetof`, `sizeof`.
1385 * Macros can have attributes.
1386 * Macros can expand to items with attributes.
1387 * Macros can expand to multiple items.
1388 * The `asm!` macro is feature-gated (`#[feature(asm)]`).
1389 * Comments may be nested.
1390 * Values automatically coerce to trait objects they implement, without
1392 * Enum discriminants are no longer an entire word but as small as needed to
1393 contain all the variants. The `repr` attribute can be used to override
1394 the discriminant size, as in `#[repr(int)]` for integer-sized, and
1395 `#[repr(C)]` to match C enums.
1396 * Non-string literals are not allowed in attributes (they never worked).
1397 * The FFI now supports variadic functions.
1398 * Octal numeric literals, as in `0o7777`.
1399 * The `concat!` syntax extension performs compile-time string concatenation.
1400 * The `#[fixed_stack_segment]` and `#[rust_stack]` attributes have been
1401 removed as Rust no longer uses segmented stacks.
1402 * Non-ascii identifiers are feature-gated (`#[feature(non_ascii_idents)]`).
1403 * Ignoring all fields of an enum variant or tuple-struct is done with `..`,
1404 not `*`; ignoring remaining fields of a struct is also done with `..`,
1405 not `_`; ignoring a slice of a vector is done with `..`, not `.._`.
1406 * `rustc` supports the "win64" calling convention via `extern "win64"`.
1407 * `rustc` supports the "system" calling convention, which defaults to the
1408 preferred convention for the target platform, "stdcall" on 32-bit Windows,
1410 * The `type_overflow` lint (default: warn) checks literals for overflow.
1411 * The `unsafe_block` lint (default: allow) checks for usage of `unsafe`.
1412 * The `attribute_usage` lint (default: warn) warns about unknown
1414 * The `unknown_features` lint (default: warn) warns about unknown
1416 * The `dead_code` lint (default: warn) checks for dead code.
1417 * Rust libraries can be linked statically to one another
1418 * `#[link_args]` is behind the `link_args` feature gate.
1419 * Native libraries are now linked with `#[link(name = "foo")]`
1420 * Native libraries can be statically linked to a rust crate
1421 (`#[link(name = "foo", kind = "static")]`).
1422 * Native OS X frameworks are now officially supported
1423 (`#[link(name = "foo", kind = "framework")]`).
1424 * The `#[thread_local]` attribute creates thread-local (not task-local)
1425 variables. Currently behind the `thread_local` feature gate.
1426 * The `return` keyword may be used in closures.
1427 * Types that can be copied via a memcpy implement the `Pod` kind.
1428 * The `cfg` attribute can now be used on struct fields and enum variants.
1431 * std: The `option` and `result` API's have been overhauled to make them
1432 simpler, more consistent, and more composable.
1433 * std: The entire `std::io` module has been replaced with one that is
1434 more comprehensive and that properly interfaces with the underlying
1435 scheduler. File, TCP, UDP, Unix sockets, pipes, and timers are all
1437 * std: `io::util` contains a number of useful implementations of
1438 `Reader` and `Writer`, including `NullReader`, `NullWriter`,
1439 `ZeroReader`, `TeeReader`.
1440 * std: The reference counted pointer type `extra::rc` moved into std.
1441 * std: The `Gc` type in the `gc` module will replace `@` (it is currently
1442 just a wrapper around it).
1443 * std: The `Either` type has been removed.
1444 * std: `fmt::Default` can be implemented for any type to provide default
1445 formatting to the `format!` macro, as in `format!("{}", myfoo)`.
1446 * std: The `rand` API continues to be tweaked.
1447 * std: The `rust_begin_unwind` function, useful for inserting breakpoints
1448 on failure in gdb, is now named `rust_fail`.
1449 * std: The `each_key` and `each_value` methods on `HashMap` have been
1450 replaced by the `keys` and `values` iterators.
1451 * std: Functions dealing with type size and alignment have moved from the
1452 `sys` module to the `mem` module.
1453 * std: The `path` module was written and API changed.
1454 * std: `str::from_utf8` has been changed to cast instead of allocate.
1455 * std: `starts_with` and `ends_with` methods added to vectors via the
1456 `ImmutableEqVector` trait, which is in the prelude.
1457 * std: Vectors can be indexed with the `get_opt` method, which returns `None`
1458 if the index is out of bounds.
1459 * std: Task failure no longer propagates between tasks, as the model was
1460 complex, expensive, and incompatible with thread-based tasks.
1461 * std: The `Any` type can be used for dynamic typing.
1462 * std: `~Any` can be passed to the `fail!` macro and retrieved via
1464 * std: Methods that produce iterators generally do not have an `_iter`
1466 * std: `cell::Cell` and `cell::RefCell` can be used to introduce mutability
1467 roots (mutable fields, etc.). Use instead of e.g. `@mut`.
1468 * std: `util::ignore` renamed to `prelude::drop`.
1469 * std: Slices have `sort` and `sort_by` methods via the `MutableVector`
1471 * std: `vec::raw` has seen a lot of cleanup and API changes.
1472 * std: The standard library no longer includes any C++ code, and very
1473 minimal C, eliminating the dependency on libstdc++.
1474 * std: Runtime scheduling and I/O functionality has been factored out into
1475 extensible interfaces and is now implemented by two different crates:
1476 libnative, for native threading and I/O; and libgreen, for green threading
1477 and I/O. This paves the way for using the standard library in more limited
1478 embedded environments.
1479 * std: The `comm` module has been rewritten to be much faster, have a
1480 simpler, more consistent API, and to work for both native and green
1482 * std: All libuv dependencies have been moved into the rustuv crate.
1483 * native: New implementations of runtime scheduling on top of OS threads.
1484 * native: New native implementations of TCP, UDP, file I/O, process spawning,
1486 * green: The green thread scheduler and message passing types are almost
1488 * extra: The `flatpipes` module had bitrotted and was removed.
1489 * extra: All crypto functions have been removed and Rust now has a policy of
1490 not reimplementing crypto in the standard library. In the future crypto
1491 will be provided by external crates with bindings to established libraries.
1492 * extra: `c_vec` has been modernized.
1493 * extra: The `sort` module has been removed. Use the `sort` method on
1497 * The `rust` and `rusti` commands have been removed, due to lack of
1499 * `rustdoc` was completely rewritten.
1500 * `rustdoc` can test code examples in documentation.
1501 * `rustpkg` can test packages with the argument, 'test'.
1502 * `rustpkg` supports arbitrary dependencies, including C libraries.
1503 * `rustc`'s support for generating debug info is improved again.
1504 * `rustc` has better error reporting for unbalanced delimiters.
1505 * `rustc`'s JIT support was removed due to bitrot.
1506 * Executables and static libraries can be built with LTO (-Z lto)
1507 * `rustc` adds a `--dep-info` flag for communicating dependencies to
1511 Version 0.8 (2013-09-26)
1512 ============================
1514 * ~2200 changes, numerous bugfixes
1517 * The `for` loop syntax has changed to work with the `Iterator` trait.
1518 * At long last, unwinding works on Windows.
1519 * Default methods are ready for use.
1520 * Many trait inheritance bugs fixed.
1521 * Owned and borrowed trait objects work more reliably.
1522 * `copy` is no longer a keyword. It has been replaced by the `Clone` trait.
1523 * rustc can omit emission of code for the `debug!` macro if it is passed
1525 * mod.rs is now "blessed". When loading `mod foo;`, rustc will now look
1526 for foo.rs, then foo/mod.rs, and will generate an error when both are
1528 * Strings no longer contain trailing nulls. The new `std::c_str` module
1529 provides new mechanisms for converting to C strings.
1530 * The type of foreign functions is now `extern "C" fn` instead of `*u8'.
1531 * The FFI has been overhauled such that foreign functions are called directly,
1532 instead of through a stack-switching wrapper.
1533 * Calling a foreign function must be done through a Rust function with the
1534 `#[fixed_stack_segment]` attribute.
1535 * The `externfn!` macro can be used to declare both a foreign function and
1536 a `#[fixed_stack_segment]` wrapper at once.
1537 * `pub` and `priv` modifiers on `extern` blocks are no longer parsed.
1538 * `unsafe` is no longer allowed on extern fns - they are all unsafe.
1539 * `priv` is disallowed everywhere except for struct fields and enum variants.
1540 * `&T` (besides `&'static T`) is no longer allowed in `@T`.
1541 * `ref` bindings in irrefutable patterns work correctly now.
1542 * `char` is now prevented from containing invalid code points.
1543 * Casting to `bool` is no longer allowed.
1544 * `\0` is now accepted as an escape in chars and strings.
1545 * `yield` is a reserved keyword.
1546 * `typeof` is a reserved keyword.
1547 * Crates may be imported by URL with `extern mod foo = "url";`.
1548 * Explicit enum discriminants may be given as uints as in `enum E { V = 0u }`
1549 * Static vectors can be initialized with repeating elements,
1550 e.g. `static foo: [u8, .. 100]: [0, .. 100];`.
1551 * Static structs can be initialized with functional record update,
1552 e.g. `static foo: Foo = Foo { a: 5, .. bar };`.
1553 * `cfg!` can be used to conditionally execute code based on the crate
1554 configuration, similarly to `#[cfg(...)]`.
1555 * The `unnecessary_qualification` lint detects unneeded module
1556 prefixes (default: allow).
1557 * Arithmetic operations have been implemented on the SIMD types in
1558 `std::unstable::simd`.
1559 * Exchange allocation headers were removed, reducing memory usage.
1560 * `format!` implements a completely new, extensible, and higher-performance
1561 string formatting system. It will replace `fmt!`.
1562 * `print!` and `println!` write formatted strings (using the `format!`
1563 extension) to stdout.
1564 * `write!` and `writeln!` write formatted strings (using the `format!`
1565 extension) to the new Writers in `std::rt::io`.
1566 * The library section in which a function or static is placed may
1567 be specified with `#[link_section = "..."]`.
1568 * The `proto!` syntax extension for defining bounded message protocols
1570 * `macro_rules!` is hygienic for `let` declarations.
1571 * The `#[export_name]` attribute specifies the name of a symbol.
1572 * `unreachable!` can be used to indicate unreachable code, and fails
1576 * std: Transitioned to the new runtime, written in Rust.
1577 * std: Added an experimental I/O library, `rt::io`, based on the new
1579 * std: A new generic `range` function was added to the prelude, replacing
1580 `uint::range` and friends.
1581 * std: `range_rev` no longer exists. Since range is an iterator it can be
1582 reversed with `range(lo, hi).invert()`.
1583 * std: The `chain` method on option renamed to `and_then`; `unwrap_or_default`
1584 renamed to `unwrap_or`.
1585 * std: The `iterator` module was renamed to `iter`.
1586 * std: Integral types now support the `checked_add`, `checked_sub`, and
1587 `checked_mul` operations for detecting overflow.
1588 * std: Many methods in `str`, `vec`, `option, `result` were renamed for
1590 * std: Methods are standardizing on conventions for casting methods:
1591 `to_foo` for copying, `into_foo` for moving, `as_foo` for temporary
1593 * std: The `CString` type in `c_str` provides new ways to convert to and
1595 * std: `DoubleEndedIterator` can yield elements in two directions.
1596 * std: The `mut_split` method on vectors partitions an `&mut [T]` into
1598 * std: `str::from_bytes` renamed to `str::from_utf8`.
1599 * std: `pop_opt` and `shift_opt` methods added to vectors.
1600 * std: The task-local data interface no longer uses @, and keys are
1601 no longer function pointers.
1602 * std: The `swap_unwrap` method of `Option` renamed to `take_unwrap`.
1603 * std: Added `SharedPort` to `comm`.
1604 * std: `Eq` has a default method for `ne`; only `eq` is required
1606 * std: `Ord` has default methods for `le`, `gt` and `ge`; only `lt`
1607 is required in implementations.
1608 * std: `is_utf8` performance is improved, impacting many string functions.
1609 * std: `os::MemoryMap` provides cross-platform mmap.
1610 * std: `ptr::offset` is now unsafe, but also more optimized. Offsets that
1611 are not 'in-bounds' are considered undefined.
1612 * std: Many freestanding functions in `vec` removed in favor of methods.
1613 * std: Many freestanding functions on scalar types removed in favor of
1615 * std: Many options to task builders were removed since they don't make
1616 sense in the new scheduler design.
1617 * std: More containers implement `FromIterator` so can be created by the
1619 * std: More complete atomic types in `unstable::atomics`.
1620 * std: `comm::PortSet` removed.
1621 * std: Mutating methods in the `Set` and `Map` traits have been moved into
1622 the `MutableSet` and `MutableMap` traits. `Container::is_empty`,
1623 `Map::contains_key`, `MutableMap::insert`, and `MutableMap::remove` have
1624 default implementations.
1625 * std: Various `from_str` functions were removed in favor of a generic
1626 `from_str` which is available in the prelude.
1627 * std: `util::unreachable` removed in favor of the `unreachable!` macro.
1628 * extra: `dlist`, the doubly-linked list was modernized.
1629 * extra: Added a `hex` module with `ToHex` and `FromHex` traits.
1630 * extra: Added `glob` module, replacing `std::os::glob`.
1631 * extra: `rope` was removed.
1632 * extra: `deque` was renamed to `ringbuf`. `RingBuf` implements `Deque`.
1633 * extra: `net`, and `timer` were removed. The experimental replacements
1634 are `std::rt::io::net` and `std::rt::io::timer`.
1635 * extra: Iterators implemented for `SmallIntMap`.
1636 * extra: Iterators implemented for `Bitv` and `BitvSet`.
1637 * extra: `SmallIntSet` removed. Use `BitvSet`.
1638 * extra: Performance of JSON parsing greatly improved.
1639 * extra: `semver` updated to SemVer 2.0.0.
1640 * extra: `term` handles more terminals correctly.
1641 * extra: `dbg` module removed.
1642 * extra: `par` module removed.
1643 * extra: `future` was cleaned up, with some method renames.
1644 * extra: Most free functions in `getopts` were converted to methods.
1647 * rustc's debug info generation (`-Z debug-info`) is greatly improved.
1648 * rustc accepts `--target-cpu` to compile to a specific CPU architecture,
1649 similarly to gcc's `--march` flag.
1650 * rustc's performance compiling small crates is much better.
1651 * rustpkg has received many improvements.
1652 * rustpkg supports git tags as package IDs.
1653 * rustpkg builds into target-specific directories so it can be used for
1655 * The number of concurrent test tasks is controlled by the environment
1656 variable RUST_TEST_TASKS.
1657 * The test harness can now report metrics for benchmarks.
1658 * All tools have man pages.
1659 * Programs compiled with `--test` now support the `-h` and `--help` flags.
1660 * The runtime uses jemalloc for allocations.
1661 * Segmented stacks are temporarily disabled as part of the transition to
1662 the new runtime. Stack overflows are possible!
1663 * A new documentation backend, rustdoc_ng, is available for use. It is
1664 still invoked through the normal `rustdoc` command.
1667 Version 0.7 (2013-07-03)
1668 =======================
1670 * ~2000 changes, numerous bugfixes
1673 * `impl`s no longer accept a visibility qualifier. Put them on methods
1675 * The borrow checker has been rewritten with flow-sensitivity, fixing
1676 many bugs and inconveniences.
1677 * The `self` parameter no longer implicitly means `&'self self`,
1678 and can be explicitly marked with a lifetime.
1679 * Overloadable compound operators (`+=`, etc.) have been temporarily
1680 removed due to bugs.
1681 * The `for` loop protocol now requires `for`-iterators to return `bool`
1682 so they compose better.
1683 * The `Durable` trait is replaced with the `'static` bounds.
1684 * Trait default methods work more often.
1685 * Structs with the `#[packed]` attribute have byte alignment and
1686 no padding between fields.
1687 * Type parameters bound by `Copy` must now be copied explicitly with
1689 * It is now illegal to move out of a dereferenced unsafe pointer.
1690 * `Option<~T>` is now represented as a nullable pointer.
1691 * `@mut` does dynamic borrow checks correctly.
1692 * The `main` function is only detected at the topmost level of the crate.
1693 The `#[main]` attribute is still valid anywhere.
1694 * Struct fields may no longer be mutable. Use inherited mutability.
1695 * The `#[no_send]` attribute makes a type that would otherwise be
1697 * The `#[no_freeze]` attribute makes a type that would otherwise be
1699 * Unbounded recursion will abort the process after reaching the limit
1700 specified by the `RUST_MAX_STACK` environment variable (default: 1GB).
1701 * The `vecs_implicitly_copyable` lint mode has been removed. Vectors
1702 are never implicitly copyable.
1703 * `#[static_assert]` makes compile-time assertions about static bools.
1704 * At long last, 'argument modes' no longer exist.
1705 * The rarely used `use mod` statement no longer exists.
1708 * `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
1710 * `Encodable`, `Decodable`, `Ord`, `TotalOrd`, `TotalEq`, `DeepClone`,
1711 `Rand`, `Zero` and `ToStr` can all be automatically derived with
1713 * The `bytes!` macro returns a vector of bytes for string, u8, char,
1714 and unsuffixed integer literals.
1717 * The `core` crate was renamed to `std`.
1718 * The `std` crate was renamed to `extra`.
1719 * More and improved documentation.
1720 * std: `iterator` module for external iterator objects.
1721 * Many old-style (internal, higher-order function) iterators replaced by
1722 implementations of `Iterator`.
1723 * std: Many old internal vector and string iterators,
1724 incl. `any`, `all`. removed.
1725 * std: The `finalize` method of `Drop` renamed to `drop`.
1726 * std: The `drop` method now takes `&mut self` instead of `&self`.
1727 * std: The prelude no longer reexports any modules, only types and traits.
1728 * std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
1729 `Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
1730 * std: New numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
1731 `Algebraic`, `Trigonometric`, `Exponential`, `Primitive`.
1732 * std: Tuple traits and accessors defined for up to 12-tuples, e.g.
1733 `(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`.
1734 * std: Many types implement `Clone`.
1735 * std: `path` type renamed to `Path`.
1736 * std: `mut` module and `Mut` type removed.
1737 * std: Many standalone functions removed in favor of methods and iterators
1738 in `vec`, `str`. In the future methods will also work as functions.
1739 * std: `reinterpret_cast` removed. Use `transmute`.
1740 * std: ascii string handling in `std::ascii`.
1741 * std: `Rand` is implemented for ~/@.
1742 * std: `run` module for spawning processes overhauled.
1743 * std: Various atomic types added to `unstable::atomic`.
1744 * std: Various types implement `Zero`.
1745 * std: `LinearMap` and `LinearSet` renamed to `HashMap` and `HashSet`.
1746 * std: Borrowed pointer functions moved from `ptr` to `borrow`.
1747 * std: Added `os::mkdir_recursive`.
1748 * std: Added `os::glob` function performs filesystems globs.
1749 * std: `FuzzyEq` renamed to `ApproxEq`.
1750 * std: `Map` now defines `pop` and `swap` methods.
1751 * std: `Cell` constructors converted to static methods.
1752 * extra: `rc` module adds the reference counted pointers, `Rc` and `RcMut`.
1753 * extra: `flate` module moved from `std` to `extra`.
1754 * extra: `fileinput` module for iterating over a series of files.
1755 * extra: `Complex` number type and `complex` module.
1756 * extra: `Rational` number type and `rational` module.
1757 * extra: `BigInt`, `BigUint` implement numeric and comparison traits.
1758 * extra: `term` uses terminfo now, is more correct.
1759 * extra: `arc` functions converted to methods.
1760 * extra: Implementation of fixed output size variations of SHA-2.
1763 * `unused_variable` lint mode for unused variables (default: warn).
1764 * `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks
1766 * `unused_mut` lint mode for identifying unused `mut` qualifiers
1768 * `dead_assignment` lint mode for unread variables (default: warn).
1769 * `unnecessary_allocation` lint mode detects some heap allocations that are
1770 immediately borrowed so could be written without allocating (default: warn).
1771 * `missing_doc` lint mode (default: allow).
1772 * `unreachable_code` lint mode (default: warn).
1773 * The `rusti` command has been rewritten and a number of bugs addressed.
1774 * rustc outputs in color on more terminals.
1775 * rustc accepts a `--link-args` flag to pass arguments to the linker.
1776 * rustc accepts a `-Z print-link-args` flag for debugging linkage.
1777 * Compiling with `-g` will make the binary record information about
1778 dynamic borrowcheck failures for debugging.
1779 * rustdoc has a nicer stylesheet.
1780 * Various improvements to rustdoc.
1781 * Improvements to rustpkg (see the detailed release notes).
1784 Version 0.6 (2013-04-03)
1785 ========================
1787 * ~2100 changes, numerous bugfixes
1790 * The self type parameter in traits is now spelled `Self`
1791 * The `self` parameter in trait and impl methods must now be explicitly
1792 named (for example: `fn f(&self) { }`). Implicit self is deprecated.
1793 * Static methods no longer require the `static` keyword and instead
1794 are distinguished by the lack of a `self` parameter
1795 * Replaced the `Durable` trait with the `'static` lifetime
1796 * The old closure type syntax with the trailing sigil has been
1797 removed in favor of the more consistent leading sigil
1798 * `super` is a keyword, and may be prefixed to paths
1799 * Trait bounds are separated with `+` instead of whitespace
1800 * Traits are implemented with `impl Trait for Type`
1801 instead of `impl Type: Trait`
1802 * Lifetime syntax is now `&'l foo` instead of `&l/foo`
1803 * The `export` keyword has finally been removed
1804 * The `move` keyword has been removed (see "Semantic changes")
1805 * The interior mutability qualifier on vectors, `[mut T]`, has been
1806 removed. Use `&mut [T]`, etc.
1807 * `mut` is no longer valid in `~mut T`. Use inherited mutability
1808 * `fail` is no longer a keyword. Use `fail!()`
1809 * `assert` is no longer a keyword. Use `assert!()`
1810 * `log` is no longer a keyword. use `debug!`, etc.
1811 * 1-tuples may be represented as `(T,)`
1812 * Struct fields may no longer be `mut`. Use inherited mutability,
1813 `@mut T`, `core::mut` or `core::cell`
1814 * `extern mod { ... }` is no longer valid syntax for foreign
1815 function modules. Use extern blocks: `extern { ... }`
1816 * Newtype enums removed. Use tuple-structs.
1817 * Trait implementations no longer support visibility modifiers
1818 * Pattern matching over vectors improved and expanded
1819 * `const` renamed to `static` to correspond to lifetime name,
1820 and make room for future `static mut` unsafe mutable globals.
1821 * Replaced `#[deriving_eq]` with `#[deriving(Eq)]`, etc.
1822 * `Clone` implementations can be automatically generated with
1823 `#[deriving(Clone)]`
1824 * Casts to traits must use a pointer sigil, e.g. `@foo as @Bar`
1825 instead of `foo as Bar`.
1826 * Fixed length vector types are now written as `[int, .. 3]`
1827 instead of `[int * 3]`.
1828 * Fixed length vector types can express the length as a constant
1829 expression. (ex: `[int, .. GL_BUFFER_SIZE - 2]`)
1832 * Types with owned pointers or custom destructors move by default,
1833 eliminating the `move` keyword
1834 * All foreign functions are considered unsafe
1835 * &mut is now unaliasable
1836 * Writes to borrowed @mut pointers are prevented dynamically
1838 * The name of the main function can be customized using #[main]
1839 * The default type of an inferred closure is &fn instead of @fn
1840 * `use` statements may no longer be "chained" - they cannot import
1841 identifiers imported by previous `use` statements
1842 * `use` statements are crate relative, importing from the "top"
1843 of the crate by default. Paths may be prefixed with `super::`
1844 or `self::` to change the search behavior.
1845 * Method visibility is inherited from the implementation declaration
1846 * Structural records have been removed
1847 * Many more types can be used in static items, including enums
1848 'static-lifetime pointers and vectors
1849 * Pattern matching over vectors improved and expanded
1850 * Typechecking of closure types has been overhauled to
1851 improve inference and eliminate unsoundness
1852 * Macros leave scope at the end of modules, unless that module is
1853 tagged with #[macro_escape]
1856 * Added big integers to `std::bigint`
1857 * Removed `core::oldcomm` module
1858 * Added pipe-based `core::comm` module
1859 * Numeric traits have been reorganized under `core::num`
1860 * `vec::slice` finally returns a slice
1861 * `debug!` and friends don't require a format string, e.g. `debug!(Foo)`
1862 * Containers reorganized around traits in `core::container`
1863 * `core::dvec` removed, `~[T]` is a drop-in replacement
1864 * `core::send_map` renamed to `core::hashmap`
1865 * `std::map` removed; replaced with `core::hashmap`
1866 * `std::treemap` reimplemented as an owned balanced tree
1867 * `std::deque` and `std::smallintmap` reimplemented as owned containers
1868 * `core::trie` added as a fast ordered map for integer keys
1869 * Set types added to `core::hashmap`, `core::trie` and `std::treemap`
1870 * `Ord` split into `Ord` and `TotalOrd`. `Ord` is still used to
1871 overload the comparison operators, whereas `TotalOrd` is used
1872 by certain container types
1875 * Replaced the 'cargo' package manager with 'rustpkg'
1876 * Added all-purpose 'rust' tool
1877 * `rustc --test` now supports benchmarks with the `#[bench]` attribute
1878 * rustc now *attempts* to offer spelling suggestions
1879 * Improved support for ARM and Android
1880 * Preliminary MIPS backend
1881 * Improved foreign function ABI implementation for x86, x86_64
1882 * Various memory usage improvements
1883 * Rust code may be embedded in foreign code under limited circumstances
1884 * Inline assembler supported by new asm!() syntax extension.
1887 Version 0.5 (2012-12-21)
1888 ===========================
1890 * ~900 changes, numerous bugfixes
1893 * Removed `<-` move operator
1894 * Completed the transition from the `#fmt` extension syntax to `fmt!`
1895 * Removed old fixed length vector syntax - `[T]/N`
1896 * New token-based quasi-quoters, `quote_tokens!`, `quote_expr!`, etc.
1897 * Macros may now expand to items and statements
1898 * `a.b()` is always parsed as a method call, never as a field projection
1899 * `Eq` and `IterBytes` implementations can be automatically generated
1900 with `#[deriving_eq]` and `#[deriving_iter_bytes]` respectively
1901 * Removed the special crate language for `.rc` files
1902 * Function arguments may consist of any irrefutable pattern
1905 * `&` and `~` pointers may point to objects
1906 * Tuple structs - `struct Foo(Bar, Baz)`. Will replace newtype enums.
1907 * Enum variants may be structs
1908 * Destructors can be added to all nominal types with the Drop trait
1909 * Structs and nullary enum variants may be constants
1910 * Values that cannot be implicitly copied are now automatically moved
1911 without writing `move` explicitly
1912 * `&T` may now be coerced to `*T`
1913 * Coercions happen in `let` statements as well as function calls
1914 * `use` statements now take crate-relative paths
1915 * The module and type namespaces have been merged so that static
1916 method names can be resolved under the trait in which they are
1919 * Improved support for language features
1920 * Trait inheritance works in many scenarios
1921 * More support for explicit self arguments in methods - `self`, `&self`
1922 `@self`, and `~self` all generally work as expected
1923 * Static methods work in more situations
1924 * Experimental: Traits may declare default methods for the implementations
1928 * New condition handling system in `core::condition`
1929 * Timsort added to `std::sort`
1930 * New priority queue, `std::priority_queue`
1931 * Pipes for serializable types, `std::flatpipes'
1932 * Serialization overhauled to be trait-based
1933 * Expanded `getopts` definitions
1934 * Moved futures to `std`
1935 * More functions are pure now
1936 * `core::comm` renamed to `oldcomm`. Still deprecated
1937 * `rustdoc` and `cargo` are libraries now
1940 * Added a preliminary REPL, `rusti`
1941 * License changed from MIT to dual MIT/APL2
1944 Version 0.4 (2012-10-15)
1945 ==========================
1947 * ~2000 changes, numerous bugfixes
1950 * All keywords are now strict and may not be used as identifiers anywhere
1951 * Keyword removal: 'again', 'import', 'check', 'new', 'owned', 'send',
1952 'of', 'with', 'to', 'class'.
1953 * Classes are replaced with simpler structs
1954 * Explicit method self types
1955 * `ret` became `return` and `alt` became `match`
1956 * `import` is now `use`; `use is now `extern mod`
1957 * `extern mod { ... }` is now `extern { ... }`
1958 * `use mod` is the recommended way to import modules
1959 * `pub` and `priv` replace deprecated export lists
1960 * The syntax of `match` pattern arms now uses fat arrow (=>)
1961 * `main` no longer accepts an args vector; use `os::args` instead
1964 * Trait implementations are now coherent, ala Haskell typeclasses
1965 * Trait methods may be static
1966 * Argument modes are deprecated
1967 * Borrowed pointers are much more mature and recommended for use
1968 * Strings and vectors in the static region are stored in constant memory
1969 * Typestate was removed
1970 * Resolution rewritten to be more reliable
1971 * Support for 'dual-mode' data structures (freezing and thawing)
1974 * Most binary operators can now be overloaded via the traits in
1976 * `std::net::url` for representing URLs
1977 * Sendable hash maps in `core::send_map`
1978 * `core::task' gained a (currently unsafe) task-local storage API
1981 * An efficient new intertask communication primitive called the pipe,
1982 along with a number of higher-level channel types, in `core::pipes`
1983 * `std::arc`, an atomically reference counted, immutable, shared memory
1985 * `std::sync`, various exotic synchronization tools based on arcs and pipes
1986 * Futures are now based on pipes and sendable
1987 * More robust linked task failure
1988 * Improved task builder API
1991 * Improved error reporting
1992 * Preliminary JIT support
1993 * Preliminary work on precise GC
1994 * Extensive architectural improvements to rustc
1995 * Begun a transition away from buggy C++-based reflection (shape) code to
1996 Rust-based (visitor) code
1997 * All hash functions and tables converted to secure, randomized SipHash
2000 Version 0.3 (2012-07-12)
2001 ========================
2003 * ~1900 changes, numerous bugfixes
2005 * New coding conveniences
2006 * Integer-literal suffix inference
2007 * Per-item control over warnings, errors
2008 * #[cfg(windows)] and #[cfg(unix)] attributes
2009 * Documentation comments
2010 * More compact closure syntax
2011 * 'do' expressions for treating higher-order functions as
2013 * *-patterns (wildcard extended to all constructor fields)
2016 * Name resolution pass and exhaustiveness checker rewritten
2017 * Region pointers and borrow checking supersede alias
2019 * Init-ness checking is now provided by a region-based liveness
2020 pass instead of the typestate pass; same for last-use analysis
2021 * Extensive work on region pointers
2023 * Experimental new language features
2024 * Slices and fixed-size, interior-allocated vectors
2025 * #!-comments for lang versioning, shell execution
2026 * Destructors and iface implementation for classes;
2027 type-parameterized classes and class methods
2028 * 'const' type kind for types that can be used to implement
2029 shared-memory concurrency patterns
2033 * Removal of various obsolete features
2034 * Keywords: 'be', 'prove', 'syntax', 'note', 'mutable', 'bind',
2035 'crust', 'native' (now 'extern'), 'cont' (now 'again')
2037 * Constructs: do-while loops ('do' repurposed), fn binding,
2038 resources (replaced by destructors)
2040 * Compiler reorganization
2041 * Syntax-layer of compiler split into separate crate
2042 * Clang (from LLVM project) integrated into build
2043 * Typechecker split into sub-modules
2046 * New time functions
2047 * Extension methods for many built-in types
2048 * Arc: atomic-refcount read-only / exclusive-use shared cells
2049 * Par: parallel map and search routines
2050 * Extensive work on libuv interface
2051 * Much vector code moved to libraries
2052 * Syntax extensions: #line, #col, #file, #mod, #stringify,
2053 #include, #include_str, #include_bin
2056 * Cargo automatically resolves dependencies
2059 Version 0.2 (2012-03-29)
2060 =========================
2062 * >1500 changes, numerous bugfixes
2064 * New docs and doc tooling
2066 * New port: FreeBSD x86_64
2068 * Compilation model enhancements
2069 * Generics now specialized, multiply instantiated
2070 * Functions now inlined across separate crates
2072 * Scheduling, stack and threading fixes
2073 * Noticeably improved message-passing performance
2074 * Explicit schedulers
2078 * Experimental new language features
2079 * Operator overloading
2083 * Various language extensions
2084 * C-callback function types: 'crust fn ...'
2085 * Infinite-loop construct: 'loop { ... }'
2086 * Shorten 'mutable' to 'mut'
2087 * Required mutable-local qualifier: 'let mut ...'
2088 * Basic glob-exporting: 'export foo::*;'
2089 * Alt now exhaustive, 'alt check' for runtime-checked
2090 * Block-function form of 'for' loop, with 'break' and 'ret'.
2093 * AST quasi-quote syntax extension
2094 * Revived libuv interface
2095 * New modules: core::{future, iter}, std::arena
2096 * Merged per-platform std::{os*, fs*} to core::{libc, os}
2097 * Extensive cleanup, regularization in libstd, libcore
2100 Version 0.1 (2012-01-20)
2101 ===============================
2103 * Most language features work, including:
2104 * Unique pointers, unique closures, move semantics
2105 * Interface-constrained generics
2106 * Static interface dispatch
2108 * Multithread task scheduling
2109 * Typestate predicates
2110 * Failure unwinding, destructors
2111 * Pattern matching and destructuring assignment
2112 * Lightweight block-lambda syntax
2113 * Preliminary macro-by-example
2115 * Compiler works with the following configurations:
2116 * Linux: x86 and x86_64 hosts and targets
2117 * MacOS: x86 and x86_64 hosts and targets
2118 * Windows: x86 hosts and targets
2120 * Cross compilation / multi-target configuration supported.
2122 * Preliminary API-documentation and package-management tools included.
2126 * Documentation is incomplete.
2128 * Performance is below intended target.
2130 * Standard library APIs are subject to extensive change, reorganization.
2132 * Language-level versioning is not yet operational - future code will