1 Version 1.0.0-alpha.2 (February 2015)
2 -------------------------------------
4 * ~1300 changes, numerous bugfixes
8 * The various I/O modules were [overhauled][io-rfc] to reduce
9 unncessary abstractions and provide better interoperation with
10 the underlying platform. The old `io` module remains temporarily
12 * The standard library now [partipates in feature gating][feat],
13 so use of unstable libraries now requires a `#![feature(...)]`
14 attribute. The impact of this change is [described on the
15 forum][feat-forum]. [RFC][feat-rfc].
19 * `for` loops [now operate on the `IntoIterator` trait][into],
20 which eliminates the need to call `.iter()`, etc. to iterate
21 over collections. There are some new subtleties to remember
22 though regarding what sort of iterators various types yield, in
23 particular that `for foo in bar { }` yields values from a move
24 iterator, destroying the original collection. [RFC][into-rfc].
25 * Objects now have [default lifetime bounds][obj], so you don't
26 have to write `Box<Trait+'static>` when you don't care about
27 storing references. [RFC][obj-rfc].
28 * In types that implement `Drop`, [lifetimes must outlive the
29 value][drop]. This will soon make it possible to safely
30 implement `Drop` for types where `#[unsafe_destructor]` is now
31 required. Read the [gorgeous RFC][drop-rfc] for details.
32 * The fully qualified <T as Trait>::X syntax lets you set the Self
33 type for a trait method or associated type. [RFC][ufcs-rfc].
34 * References to types that implement `Deref<U>` now [automatically
35 coerce to references][deref] to the dereferenced type `U`,
36 e.g. `&T where T: Deref<U>` automatically coerces to `&U`. This
37 should eliminate many unsightly uses of `&*`, as when converting
38 from references to vectors into references to
39 slices. [RFC][deref-rfc].
40 * The explicit [closure kind syntax][close] (`|&:|`, `|&mut:|`,
41 `|:|`) is obsolete and closure kind is inferred from context.
42 * [`Self` is a keyword][Self].
46 * The `Show` and `String` formatting traits [have been
47 renamed][fmt] to `Debug` and `Display` to more clearly reflect
48 their related purposes. Automatically getting a string
49 conversion to use with `format!("{:?}", something_to_debug)` is
50 now written `#[derive(Debug)]`.
51 * Abstract [OS-specific string types][osstr], `std::ff::{OsString,
52 OsStr}`, provide strings in platform-specific encodings for easier
53 interop with system APIs. [RFC][osstr-rfc].
54 * The `boxed::into_raw` and `Box::frow_raw` functions [convert
55 between `Box<T>` and `*mut T`][boxraw], a common pattern for
56 creating raw pointers.
60 * Certain long error messages of the form 'expected foo found bar'
61 are now [split neatly across multiple
62 lines][multiline]. Examples in the PR.
63 * On Unix Rust can be [uninstalled][un] by running
64 `/usr/local/lib/rustlib/uninstall.sh`.
65 * The `#[rustc_on_unimplemented]` attribute, requiring the
66 'on_unimplemented' feature, lets rustc [display custom error
67 messages when a trait is expected to be implemented for a type
72 * Rust is tested against a [LALR grammar][lalr], which parses
73 almost all the Rust files that rustc does.
75 [boxraw]: https://github.com/rust-lang/rust/pull/21318
76 [close]: https://github.com/rust-lang/rust/pull/21843
77 [deref]: https://github.com/rust-lang/rust/pull/21351
78 [deref-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0241-deref-conversions.md
79 [drop]: https://github.com/rust-lang/rust/pull/21972
80 [drop-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0769-sound-generic-drop.md
81 [feat]: https://github.com/rust-lang/rust/pull/21248
82 [feat-forum]: http://users.rust-lang.org/t/psa-important-info-about-rustcs-new-feature-staging/82/5
83 [feat-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md
84 [fmt]: https://github.com/rust-lang/rust/pull/21457
85 [into]: https://github.com/rust-lang/rust/pull/20790
86 [into-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md#intoiterator-and-iterable
87 [io-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
88 [lalr]: https://github.com/rust-lang/rust/pull/21452
89 [multiline]: https://github.com/rust-lang/rust/pull/19870
90 [obj]: https://github.com/rust-lang/rust/pull/22230
91 [obj-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0599-default-object-bound.md
92 [onun]: https://github.com/rust-lang/rust/pull/20889
93 [osstr]: https://github.com/rust-lang/rust/pull/21488
94 [osstr-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0517-io-os-reform.md
95 [Self]: https://github.com/rust-lang/rust/pull/22158
96 [ufcs]: https://github.com/rust-lang/rust/pull/21077
97 [ufcs-rfc]: https://github.com/rust-lang/rfcs/blob/master/text/0132-ufcs.md
98 [un]: https://github.com/rust-lang/rust/pull/22256
100 Version 1.0.0-alpha (January 2015)
101 ----------------------------------
103 * ~2400 changes, numerous bugfixes
107 * The language itself is considered feature complete for 1.0,
108 though there will be many usability improvements and bugfixes
109 before the final release.
110 * Nearly 50% of the public API surface of the standard library has
111 been declared 'stable'. Those interfaces are unlikely to change
113 * The long-running debate over integer types has been
114 [settled][ints]: Rust will ship with types named `isize` and
115 `usize`, rather than `int` and `uint`, for pointer-sized
116 integers. Guidelines will be rolled out during the alpha cycle.
117 * Most crates that are not `std` have been moved out of the Rust
118 distribution into the Cargo ecosystem so they can evolve
119 separately and don't need to be stabilized as quickly, including
120 'time', 'getopts', 'num', 'regex', and 'term'.
121 * Documentation continues to be expanded with more API coverage, more
122 examples, and more in-depth explanations. The guides have been
123 consolidated into [The Rust Programming Language][trpl].
124 * "[Rust By Example][rbe]" is now maintained by the Rust team.
125 * All official Rust binary installers now come with [Cargo], the
126 Rust package manager.
130 * Closures have been [completely redesigned][unboxed] to be
131 implemented in terms of traits, can now be used as generic type
132 bounds and thus monomorphized and inlined, or via an opaque
133 pointer (boxed) as in the old system. The new system is often
134 referred to as 'unboxed' closures.
135 * Traits now support [associated types][assoc], allowing families
136 of related types to be defined together and used generically in
138 * Enum variants are [namespaced by their type names][enum].
139 * [`where` clauses][where] provide a more versatile and attractive
140 syntax for specifying generic bounds, though the previous syntax
142 * Rust again picks a [fallback][fb] (either i32 or f64) for uninferred
144 * Rust [no longer has a runtime][rt] of any description, and only
145 supports OS threads, not green threads.
146 * At long last, Rust has been overhauled for 'dynamically-sized
147 types' ([DST]), which integrates 'fat pointers' (object types,
148 arrays, and `str`) more deeply into the type system, making it
150 * Rust now has a general [range syntax][range], `i..j`, `i..`, and
151 `..j` that produce range types and which, when combined with the
152 `Index` operator and multidispatch, leads to a convenient slice
154 * The new range syntax revealed an ambiguity in the fixed-length
155 array syntax, so now fixed length arrays [are written `[T;
157 * The `Copy` trait is no longer implemented automatically. Unsafe
158 pointers no longer implement `Sync` and `Send` so types
159 containing them don't automatically either. `Sync` and `Send`
160 are now 'unsafe traits' so one can "forcibly" implement them via
161 `unsafe impl` if a type confirms to the requirements for them
162 even though the internals do not (e.g. structs containing unsafe
163 pointers like `Arc`). These changes are intended to prevent some
164 footguns and are collectively known as [opt-in built-in
165 traits][oibit] (though `Sync` and `Send` will soon become pure
166 library types unknown to the compiler).
167 * Operator traits now take their operands [by value][ops], and
168 comparison traits can use multidispatch to compare one type
169 against multiple other types, allowing e.g. `String` to be
170 compared with `&str`.
171 * `if let` and `while let` are no longer feature-gated.
172 * Rust has adopted a more [uniform syntax for escaping unicode
173 characters][unicode].
174 * `macro_rules!` [has been declared stable][mac]. Though it is a
175 flawed system it is sufficiently popular that it must be usable
176 for 1.0. Effort has gone into [future-proofing][mac-future] it
177 in ways that will allow other macro systems to be developed in
178 parallel, and won't otherwise impact the evolution of the
180 * The prelude has been [pared back significantly][prelude] such
181 that it is the minimum necessary to support the most pervasive
182 code patterns, and through [generalized where clauses][where]
183 many of the prelude extension traits have been consolidated.
184 * Rust's rudimentary reflection [has been removed][refl], as it
185 incurred too much code generation for little benefit.
186 * [Struct variants][structvars] are no longer feature-gated.
187 * Trait bounds can be [polymorphic over lifetimes][hrtb]. Also
188 known as 'higher-ranked trait bounds', this crucially allows
189 unboxed closures to work.
190 * Macros invocations surrounded by parens or square brackets and
191 not terminated by a semicolon are [parsed as
192 expressions][macros], which makes expressions like `vec![1i32,
193 2, 3].len()` work as expected.
194 * Trait objects now implement their traits automatically, and
195 traits that can be coerced to objects now must be [object
197 * Automatically deriving traits is now done with `#[derive(...)]`
198 not `#[deriving(...)]` for [consistency with other naming
199 conventions][derive].
200 * Importing the containing module or enum at the same time as
201 items or variants they contain is [now done with `self` instead
202 of `mod`][self], as in use `foo::{self, bar}`
203 * Glob imports are no longer feature-gated.
204 * The `box` operator and `box` patterns have been feature-gated
205 pending a redesign. For now unique boxes should be allocated
206 like other containers, with `Box::new`.
210 * A [series][coll1] of [efforts][coll2] to establish
211 [conventions][coll3] for collections types has resulted in API
212 improvements throughout the standard library.
213 * New [APIs for error handling][err] provide ergonomic interop
214 between error types, and [new conventions][err-conv] describe
215 more clearly the recommended error handling strategies in Rust.
216 * The `fail!` macro has been renamed to [`panic!`][panic] so that
217 it is easier to discuss failure in the context of error handling
218 without making clarifications as to whether you are referring to
219 the 'fail' macro or failure more generally.
220 * On Linux, `OsRng` prefers the new, more reliable `getrandom`
221 syscall when available.
222 * The 'serialize' crate has been renamed 'rustc-serialize' and
223 moved out of the distribution to Cargo. Although it is widely
224 used now, it is expected to be superceded in the near future.
225 * The `Show` formatter, typically implemented with
226 `#[derive(Show)]` is [now requested with the `{:?}`
227 specifier][show] and is intended for use by all types, for uses
228 such as `println!` debugging. The new `String` formatter must be
229 implemented by hand, uses the `{}` specifier, and is intended
230 for full-fidelity conversions of things that can logically be
231 represented as strings.
235 * [Flexible target specification][flex] allows rustc's code
236 generation to be configured to support otherwise-unsupported
238 * Rust comes with rust-gdb and rust-lldb scripts that launch their
239 respective debuggers with Rust-appropriate pretty-printing.
240 * The Windows installation of Rust is distributed with the the
241 MinGW components currently required to link binaries on that
246 * Nullable enum optimizations have been extended to more types so
247 that e.g. `Option<Vec<T>>` and `Option<String>` take up no more
248 space than the inner types themselves.
249 * Work has begun on supporting AArch64.
251 [Cargo]: https://crates.io
252 [unboxed]: http://smallcultfollowing.com/babysteps/blog/2014/11/26/purging-proc/
253 [enum]: https://github.com/rust-lang/rfcs/blob/master/text/0390-enum-namespacing.md
254 [flex]: https://github.com/rust-lang/rfcs/blob/master/text/0131-target-specification.md
255 [err]: https://github.com/rust-lang/rfcs/blob/master/text/0201-error-chaining.md
256 [err-conv]: https://github.com/rust-lang/rfcs/blob/master/text/0236-error-conventions.md
257 [rt]: https://github.com/rust-lang/rfcs/blob/master/text/0230-remove-runtime.md
258 [mac]: https://github.com/rust-lang/rfcs/blob/master/text/0453-macro-reform.md
259 [mac-future]: https://github.com/rust-lang/rfcs/pull/550
260 [DST]: http://smallcultfollowing.com/babysteps/blog/2014/01/05/dst-take-5/
261 [coll1]: https://github.com/rust-lang/rfcs/blob/master/text/0235-collections-conventions.md
262 [coll2]: https://github.com/rust-lang/rfcs/blob/master/text/0509-collections-reform-part-2.md
263 [coll3]: https://github.com/rust-lang/rfcs/blob/master/text/0216-collection-views.md
264 [ops]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md
265 [prelude]: https://github.com/rust-lang/rfcs/blob/master/text/0503-prelude-stabilization.md
266 [where]: https://github.com/rust-lang/rfcs/blob/master/text/0135-where.md
267 [refl]: https://github.com/rust-lang/rfcs/blob/master/text/0379-remove-reflection.md
268 [panic]: https://github.com/rust-lang/rfcs/blob/master/text/0221-panic.md
269 [structvars]: https://github.com/rust-lang/rfcs/blob/master/text/0418-struct-variants.md
270 [hrtb]: https://github.com/rust-lang/rfcs/blob/master/text/0387-higher-ranked-trait-bounds.md
271 [unicode]: https://github.com/rust-lang/rfcs/blob/master/text/0446-es6-unicode-escapes.md
272 [oibit]: https://github.com/rust-lang/rfcs/blob/master/text/0019-opt-in-builtin-traits.md
273 [macros]: https://github.com/rust-lang/rfcs/blob/master/text/0378-expr-macros.md
274 [range]: https://github.com/rust-lang/rfcs/blob/master/text/0439-cmp-ops-reform.md#indexing-and-slicing
275 [arrays]: https://github.com/rust-lang/rfcs/blob/master/text/0520-new-array-repeat-syntax.md
276 [show]: https://github.com/rust-lang/rfcs/blob/master/text/0504-show-stabilization.md
277 [derive]: https://github.com/rust-lang/rfcs/blob/master/text/0534-deriving2derive.md
278 [self]: https://github.com/rust-lang/rfcs/blob/master/text/0532-self-in-use.md
279 [fb]: https://github.com/rust-lang/rfcs/blob/master/text/0212-restore-int-fallback.md
280 [objsafe]: https://github.com/rust-lang/rfcs/blob/master/text/0255-object-safety.md
281 [assoc]: https://github.com/rust-lang/rfcs/blob/master/text/0195-associated-items.md
282 [ints]: https://github.com/rust-lang/rfcs/pull/544#issuecomment-68760871
283 [trpl]: http://doc.rust-lang.org/book/index.html
284 [rbe]: http://rustbyexample.com/
286 Version 0.12.0 (October 2014)
287 -----------------------------
289 * ~1900 changes, numerous bugfixes
293 * The introductory documentation (now called The Rust Guide) has
294 been completely rewritten, as have a number of supplementary
296 * Rust's package manager, Cargo, continues to improve and is
297 sometimes considered to be quite awesome.
298 * Many API's in `std` have been reviewed and updated for
299 consistency with the in-development Rust coding
300 guidelines. The standard library documentation tracks
301 stabilization progress.
302 * Minor libraries have been moved out-of-tree to the rust-lang org
303 on GitHub: uuid, semver, glob, num, hexfloat, fourcc. They can
304 be installed with Cargo.
305 * Lifetime elision allows lifetime annotations to be left off of
306 function declarations in many common scenarios.
307 * Rust now works on 64-bit Windows.
310 * Indexing can be overloaded with the `Index` and `IndexMut`
312 * The `if let` construct takes a branch only if the `let` pattern
313 matches, currently behind the 'if_let' feature gate.
314 * 'where clauses', a more flexible syntax for specifying trait
315 bounds that is more aesthetic, have been added for traits and
316 free functions. Where clauses will in the future make it
317 possible to constrain associated types, which would be
318 impossible with the existing syntax.
319 * A new slicing syntax (e.g. `[0..4]`) has been introduced behind
320 the 'slicing_syntax' feature gate, and can be overloaded with
321 the `Slice` or `SliceMut` traits.
322 * The syntax for matching of sub-slices has been changed to use a
323 postfix `..` instead of prefix (.e.g. `[a, b, c..]`), for
324 consistency with other uses of `..` and to future-proof
325 potential additional uses of the syntax.
326 * The syntax for matching inclusive ranges in patterns has changed
327 from `0..3` to `0...4` to be consistent with the exclusive range
329 * Matching of sub-slices in non-tail positions (e.g. `[a.., b,
330 c]`) has been put behind the 'advanced_slice_patterns' feature
331 gate and may be removed in the future.
332 * Components of tuples and tuple structs can be extracted using
333 the `value.0` syntax, currently behind the `tuple_indexing`
335 * The `#[crate_id]` attribute is no longer supported; versioning
336 is handled by the package manager.
337 * Renaming crate imports are now written `extern crate foo as bar`
338 instead of `extern crate bar = foo`.
339 * Renaming use statements are now written `use foo as bar` instead
341 * `let` and `match` bindings and argument names in macros are now
343 * The new, more efficient, closure types ('unboxed closures') have
344 been added under a feature gate, 'unboxed_closures'. These will
345 soon replace the existing closure types, once higher-ranked
346 trait lifetimes are added to the language.
347 * `move` has been added as a keyword, for indicating closures
348 that capture by value.
349 * Mutation and assignment is no longer allowed in pattern guards.
350 * Generic structs and enums can now have trait bounds.
351 * The `Share` trait is now called `Sync` to free up the term
352 'shared' to refer to 'shared reference' (the default reference
354 * Dynamically-sized types have been mostly implemented,
355 unifying the behavior of fat-pointer types with the rest of the
357 * As part of dynamically-sized types, the `Sized` trait has been
358 introduced, which qualifying types implement by default, and
359 which type parameters expect by default. To specify that a type
360 parameter does not need to be sized, write `<Sized? T>`. Most
361 types are `Sized`, notable exceptions being unsized arrays
362 (`[T]`) and trait types.
363 * Closures can return `!`, as in `|| -> !` or `proc() -> !`.
364 * Lifetime bounds can now be applied to type parameters and object
366 * The old, reference counted GC type, `Gc<T>` which was once
367 denoted by the `@` sigil, has finally been removed. GC will be
368 revisited in the future.
371 * Library documentation has been improved for a number of modules.
372 * Bit-vectors, collections::bitv has been modernized.
373 * The url crate is deprecated in favor of
374 http://github.com/servo/rust-url, which can be installed with
376 * Most I/O stream types can be cloned and subsequently closed from
378 * A `std::time::Duration` type has been added for use in I/O
379 methods that rely on timers, as well as in the 'time' crate's
380 `Timespec` arithmetic.
381 * The runtime I/O abstraction layer that enabled the green thread
382 scheduler to do non-thread-blocking I/O has been removed, along
383 with the libuv-based implementation employed by the green thread
384 scheduler. This will greatly simplify the future I/O work.
385 * `collections::btree` has been rewritten to have a more
386 idiomatic and efficient design.
389 * rustdoc output now indicates the stability levels of API's.
390 * The `--crate-name` flag can specify the name of the crate
391 being compiled, like `#[crate_name]`.
392 * The `-C metadata` specifies additional metadata to hash into
393 symbol names, and `-C extra-filename` specifies additional
394 information to put into the output filename, for use by the
395 package manager for versioning.
396 * debug info generation has continued to improve and should be
397 more reliable under both gdb and lldb.
398 * rustc has experimental support for compiling in parallel
399 using the `-C codegen-units` flag.
400 * rustc no longer encodes rpath information into binaries by
404 * Stack usage has been optimized with LLVM lifetime annotations.
405 * Official Rust binaries on Linux are more compatible with older
406 kernels and distributions, built on CentOS 5.10.
408 Version 0.11.0 (July 2014)
409 -------------------------
411 * ~1700 changes, numerous bugfixes
414 * ~[T] has been removed from the language. This type is superseded by
416 * ~str has been removed from the language. This type is superseded by
418 * ~T has been removed from the language. This type is superseded by the
420 * @T has been removed from the language. This type is superseded by the
421 standard library's std::gc::Gc<T> type.
422 * Struct fields are now all private by default.
423 * Vector indices and shift amounts are both required to be a `uint`
424 instead of any integral type.
425 * Byte character, byte string, and raw byte string literals are now all
426 supported by prefixing the normal literal with a `b`.
427 * Multiple ABIs are no longer allowed in an ABI string
428 * The syntax for lifetimes on closures/procedures has been tweaked
429 slightly: `<'a>|A, B|: 'b + K -> T`
430 * Floating point modulus has been removed from the language; however it
431 is still provided by a library implementation.
432 * Private enum variants are now disallowed.
433 * The `priv` keyword has been removed from the language.
434 * A closure can no longer be invoked through a &-pointer.
435 * The `use foo, bar, baz;` syntax has been removed from the language.
436 * The transmute intrinsic no longer works on type parameters.
437 * Statics now allow blocks/items in their definition.
438 * Trait bounds are separated from objects with + instead of : now.
439 * Objects can no longer be read while they are mutably borrowed.
440 * The address of a static is now marked as insignificant unless the
441 #[inline(never)] attribute is placed it.
442 * The #[unsafe_destructor] attribute is now behind a feature gate.
443 * Struct literals are no longer allowed in ambiguous positions such as
444 if, while, match, and for..in.
445 * Declaration of lang items and intrinsics are now feature-gated by
447 * Integral literals no longer default to `int`, and floating point
448 literals no longer default to `f64`. Literals must be suffixed with an
449 appropriate type if inference cannot determine the type of the
451 * The Box<T> type is no longer implicitly borrowed to &mut T.
452 * Procedures are now required to not capture borrowed references.
455 * The standard library is now a "facade" over a number of underlying
456 libraries. This means that development on the standard library should
457 be speeder due to smaller crates, as well as a clearer line between
459 * A new library, libcore, lives under the standard library's facade
460 which is Rust's "0-assumption" library, suitable for embedded and
461 kernel development for example.
462 * A regex crate has been added to the standard distribution. This crate
463 includes statically compiled regular expressions.
464 * The unwrap/unwrap_err methods on Result require a Show bound for
465 better error messages.
466 * The return types of the std::comm primitives have been centralized
467 around the Result type.
468 * A number of I/O primitives have gained the ability to time out their
470 * A number of I/O primitives have gained the ability to close their
471 reading/writing halves to cancel pending operations.
472 * Reverse iterator methods have been removed in favor of `rev()` on
473 their forward-iteration counterparts.
474 * A bitflags! macro has been added to enable easy interop with C and
475 management of bit flags.
476 * A debug_assert! macro is now provided which is disabled when
477 `--cfg ndebug` is passed to the compiler.
478 * A graphviz crate has been added for creating .dot files.
479 * The std::cast module has been migrated into std::mem.
480 * The std::local_data api has been migrated from freestanding functions
481 to being based on methods.
482 * The Pod trait has been renamed to Copy.
483 * jemalloc has been added as the default allocator for types.
484 * The API for allocating memory has been changed to use proper alignment
485 and sized deallocation
486 * Connecting a TcpStream or binding a TcpListener is now based on a
487 string address and a u16 port. This allows connecting to a hostname as
489 * The Reader trait now contains a core method, read_at_least(), which
490 correctly handles many repeated 0-length reads.
491 * The process-spawning API is now centered around a builder-style
493 * The :? printing qualifier has been moved from the standard library to
494 an external libdebug crate.
495 * Eq/Ord have been renamed to PartialEq/PartialOrd. TotalEq/TotalOrd
496 have been renamed to Eq/Ord.
497 * The select/plural methods have been removed from format!. The escapes
498 for { and } have also changed from \{ and \} to {{ and }},
500 * The TaskBuilder API has been re-worked to be a true builder, and
501 extension traits for spawning native/green tasks have been added.
504 * All breaking changes to the language or libraries now have their
505 commit message annotated with `[breaking-change]` to allow for easy
506 discovery of breaking changes.
507 * The compiler will now try to suggest how to annotate lifetimes if a
508 lifetime-related error occurs.
509 * Debug info continues to be improved greatly with general bug fixes and
510 better support for situations like link time optimization (LTO).
511 * Usage of syntax extensions when cross-compiling has been fixed.
512 * Functionality equivalent to GCC & Clang's -ffunction-sections,
513 -fdata-sections and --gc-sections has been enabled by default
514 * The compiler is now stricter about where it will load module files
515 from when a module is declared via `mod foo;`.
516 * The #[phase(syntax)] attribute has been renamed to #[phase(plugin)].
517 Syntax extensions are now discovered via a "plugin registrar" type
518 which will be extended in the future to other various plugins.
519 * Lints have been restructured to allow for dynamically loadable lints.
520 * A number of rustdoc improvements:
521 * The HTML output has been visually redesigned.
522 * Markdown is now powered by hoedown instead of sundown.
523 * Searching heuristics have been greatly improved.
524 * The search index has been reduced in size by a great amount.
525 * Cross-crate documentation via `pub use` has been greatly improved.
526 * Primitive types are now hyperlinked and documented.
527 * Documentation has been moved from static.rust-lang.org/doc to
529 * A new sandbox, play.rust-lang.org, is available for running and
530 sharing rust code examples on-line.
531 * Unused attributes are now more robustly warned about.
532 * The dead_code lint now warns about unused struct fields.
533 * Cross-compiling to iOS is now supported.
534 * Cross-compiling to mipsel is now supported.
535 * Stability attributes are now inherited by default and no longer apply
536 to intra-crate usage, only inter-crate usage.
537 * Error message related to non-exhaustive match expressions have been
540 Version 0.10 (April 2014)
541 -------------------------
543 * ~1500 changes, numerous bugfixes
546 * A new RFC process is now in place for modifying the language.
547 * Patterns with `@`-pointers have been removed from the language.
548 * Patterns with unique vectors (`~[T]`) have been removed from the
550 * Patterns with unique strings (`~str`) have been removed from the
552 * `@str` has been removed from the language.
553 * `@[T]` has been removed from the language.
554 * `@self` has been removed from the language.
555 * `@Trait` has been removed from the language.
556 * Headers on `~` allocations which contain `@` boxes inside the type for
557 reference counting have been removed.
558 * The semantics around the lifetimes of temporary expressions have changed,
559 see #3511 and #11585 for more information.
560 * Cross-crate syntax extensions are now possible, but feature gated. See
561 #11151 for more information. This includes both `macro_rules!` macros as
562 well as syntax extensions such as `format!`.
563 * New lint modes have been added, and older ones have been turned on to be
565 * Unnecessary parentheses
568 * Uppercase variables
569 * Publicly visible private types
570 * `#[deriving]` with raw pointers
571 * Unsafe functions can no longer be coerced to closures.
572 * Various obscure macros such as `log_syntax!` are now behind feature gates.
573 * The `#[simd]` attribute is now behind a feature gate.
574 * Visibility is no longer allowed on `extern crate` statements, and
575 unnecessary visibility (`priv`) is no longer allowed on `use` statements.
576 * Trailing commas are now allowed in argument lists and tuple patterns.
577 * The `do` keyword has been removed, it is now a reserved keyword.
578 * Default type parameters have been implemented, but are feature gated.
579 * Borrowed variables through captures in closures are now considered soundly.
580 * `extern mod` is now `extern crate`
581 * The `Freeze` trait has been removed.
582 * The `Share` trait has been added for types that can be shared among
584 * Labels in macros are now hygienic.
585 * Expression/statement macro invocations can be delimited with `{}` now.
586 * Treatment of types allowed in `static mut` locations has been tweaked.
587 * The `*` and `.` operators are now overloadable through the `Deref` and
589 * `~Trait` and `proc` no longer have `Send` bounds by default.
590 * Partial type hints are now supported with the `_` type marker.
591 * An `Unsafe` type was introduced for interior mutability. It is now
592 considered undefined to transmute from `&T` to `&mut T` without using the
594 * The #[linkage] attribute was implemented for extern statics/functions.
595 * The inner attribute syntax has changed from `#[foo];` to `#![foo]`.
596 * `Pod` was renamed to `Copy`.
599 * The `libextra` library has been removed. It has now been decomposed into
600 component libraries with smaller and more focused nuggets of
601 functionality. The full list of libraries can be found on the
602 documentation index page.
603 * std: `std::condition` has been removed. All I/O errors are now propagated
604 through the `Result` type. In order to assist with error handling, a
605 `try!` macro for unwrapping errors with an early return and a lint for
606 unused results has been added. See #12039 for more information.
607 * std: The `vec` module has been renamed to `slice`.
608 * std: A new vector type, `Vec<T>`, has been added in preparation for DST.
609 This will become the only growable vector in the future.
610 * std: `std::io` now has more public-reexports. Types such as `BufferedReader`
611 are now found at `std::io::BufferedReader` instead of
612 `std::io::buffered::BufferedReader`.
613 * std: `print` and `println` are no longer in the prelude, the `print!` and
614 `println!` macros are intended to be used instead.
615 * std: `Rc` now has a `Weak` pointer for breaking cycles, and it no longer
616 attempts to statically prevent cycles.
617 * std: The standard distribution is adopting the policy of pushing failure
618 to the user rather than failing in libraries. Many functions (such as
619 `slice::last()`) now return `Option<T>` instead of `T` + failing.
620 * std: `fmt::Default` has been renamed to `fmt::Show`, and it now has a new
621 deriving mode: `#[deriving(Show)]`.
622 * std: `ToStr` is now implemented for all types implementing `Show`.
623 * std: The formatting trait methods now take `&self` instead of `&T`
624 * std: The `invert()` method on iterators has been renamed to `rev()`
625 * std: `std::num` has seen a reduction in the genericity of its traits,
626 consolidating functionality into a few core traits.
627 * std: Backtraces are now printed on task failure if the environment
628 variable `RUST_BACKTRACE` is present.
629 * std: Naming conventions for iterators have been standardized. More details
630 can be found on the wiki's style guide.
631 * std: `eof()` has been removed from the `Reader` trait. Specific types may
632 still implement the function.
633 * std: Networking types are now cloneable to allow simultaneous reads/writes.
634 * std: `assert_approx_eq!` has been removed
635 * std: The `e` and `E` formatting specifiers for floats have been added to
636 print them in exponential notation.
637 * std: The `Times` trait has been removed
638 * std: Indications of variance and opting out of builtin bounds is done
639 through marker types in `std::kinds::marker` now
640 * std: `hash` has been rewritten, `IterBytes` has been removed, and
641 `#[deriving(Hash)]` is now possible.
642 * std: `SharedChan` has been removed, `Sender` is now cloneable.
643 * std: `Chan` and `Port` were renamed to `Sender` and `Receiver`.
644 * std: `Chan::new` is now `channel()`.
645 * std: A new synchronous channel type has been implemented.
646 * std: A `select!` macro is now provided for selecting over `Receiver`s.
647 * std: `hashmap` and `trie` have been moved to `libcollections`
648 * std: `run` has been rolled into `io::process`
649 * std: `assert_eq!` now uses `{}` instead of `{:?}`
650 * std: The equality and comparison traits have seen some reorganization.
651 * std: `rand` has moved to `librand`.
652 * std: `to_{lower,upper}case` has been implemented for `char`.
653 * std: Logging has been moved to `liblog`.
654 * collections: `HashMap` has been rewritten for higher performance and less
656 * native: The default runtime is now `libnative`. If `libgreen` is desired,
657 it can be booted manually. The runtime guide has more information and
659 * native: All I/O functionality except signals has been implemented.
660 * green: Task spawning with `libgreen` has been optimized with stack caching
661 and various trimming of code.
662 * green: Tasks spawned by `libgreen` now have an unmapped guard page.
663 * sync: The `extra::sync` module has been updated to modern rust (and moved
664 to the `sync` library), tweaking and improving various interfaces while
665 dropping redundant functionality.
666 * sync: A new `Barrier` type has been added to the `sync` library.
667 * sync: An efficient mutex for native and green tasks has been implemented.
668 * serialize: The `base64` module has seen some improvement. It treats
669 newlines better, has non-string error values, and has seen general
671 * fourcc: A `fourcc!` macro was introduced
672 * hexfloat: A `hexfloat!` macro was implemented for specifying floats via a
676 * `rustpkg` has been deprecated and removed from the main repository. Its
677 replacement, `cargo`, is under development.
678 * Nightly builds of rust are now available
679 * The memory usage of rustc has been improved many times throughout this
681 * The build process supports disabling rpath support for the rustc binary
683 * Code generation has improved in some cases, giving more information to the
684 LLVM optimization passes to enable more extensive optimizations.
685 * Debuginfo compatibility with lldb on OSX has been restored.
686 * The master branch is now gated on an android bot, making building for
687 android much more reliable.
688 * Output flags have been centralized into one `--emit` flag.
689 * Crate type flags have been centralized into one `--crate-type` flag.
690 * Codegen flags have been consolidated behind a `-C` flag.
691 * Linking against outdated crates now has improved error messages.
692 * Error messages with lifetimes will often suggest how to annotate the
693 function to fix the error.
694 * Many more types are documented in the standard library, and new guides
696 * Many `rustdoc` improvements:
697 * code blocks are syntax highlighted.
698 * render standalone markdown files.
699 * the --test flag tests all code blocks by default.
700 * exported macros are displayed.
701 * reexported types have their documentation inlined at the location of the
703 * search works across crates that have been rendered to the same output
706 Version 0.9 (January 2014)
707 --------------------------
709 * ~1800 changes, numerous bugfixes
712 * The `float` type has been removed. Use `f32` or `f64` instead.
713 * A new facility for enabling experimental features (feature gating) has
714 been added, using the crate-level `#[feature(foo)]` attribute.
715 * Managed boxes (@) are now behind a feature gate
716 (`#[feature(managed_boxes)]`) in preparation for future removal. Use the
717 standard library's `Gc` or `Rc` types instead.
718 * `@mut` has been removed. Use `std::cell::{Cell, RefCell}` instead.
719 * Jumping back to the top of a loop is now done with `continue` instead of
721 * Strings can no longer be mutated through index assignment.
722 * Raw strings can be created via the basic `r"foo"` syntax or with matched
723 hash delimiters, as in `r###"foo"###`.
724 * `~fn` is now written `proc (args) -> retval { ... }` and may only be
726 * The `&fn` type is now written `|args| -> ret` to match the literal form.
727 * `@fn`s have been removed.
728 * `do` only works with procs in order to make it obvious what the cost
730 * Single-element tuple-like structs can no longer be dereferenced to
731 obtain the inner value. A more comprehensive solution for overloading
732 the dereference operator will be provided in the future.
733 * The `#[link(...)]` attribute has been replaced with
734 `#[crate_id = "name#vers"]`.
735 * Empty `impl`s must be terminated with empty braces and may not be
736 terminated with a semicolon.
737 * Keywords are no longer allowed as lifetime names; the `self` lifetime
738 no longer has any special meaning.
739 * The old `fmt!` string formatting macro has been removed.
740 * `printf!` and `printfln!` (old-style formatting) removed in favor of
741 `print!` and `println!`.
742 * `mut` works in patterns now, as in `let (mut x, y) = (1, 2);`.
743 * The `extern mod foo (name = "bar")` syntax has been removed. Use
744 `extern mod foo = "bar"` instead.
745 * New reserved keywords: `alignof`, `offsetof`, `sizeof`.
746 * Macros can have attributes.
747 * Macros can expand to items with attributes.
748 * Macros can expand to multiple items.
749 * The `asm!` macro is feature-gated (`#[feature(asm)]`).
750 * Comments may be nested.
751 * Values automatically coerce to trait objects they implement, without
753 * Enum discriminants are no longer an entire word but as small as needed to
754 contain all the variants. The `repr` attribute can be used to override
755 the discriminant size, as in `#[repr(int)]` for integer-sized, and
756 `#[repr(C)]` to match C enums.
757 * Non-string literals are not allowed in attributes (they never worked).
758 * The FFI now supports variadic functions.
759 * Octal numeric literals, as in `0o7777`.
760 * The `concat!` syntax extension performs compile-time string concatenation.
761 * The `#[fixed_stack_segment]` and `#[rust_stack]` attributes have been
762 removed as Rust no longer uses segmented stacks.
763 * Non-ascii identifiers are feature-gated (`#[feature(non_ascii_idents)]`).
764 * Ignoring all fields of an enum variant or tuple-struct is done with `..`,
765 not `*`; ignoring remaining fields of a struct is also done with `..`,
766 not `_`; ignoring a slice of a vector is done with `..`, not `.._`.
767 * `rustc` supports the "win64" calling convention via `extern "win64"`.
768 * `rustc` supports the "system" calling convention, which defaults to the
769 preferred convention for the target platform, "stdcall" on 32-bit Windows,
771 * The `type_overflow` lint (default: warn) checks literals for overflow.
772 * The `unsafe_block` lint (default: allow) checks for usage of `unsafe`.
773 * The `attribute_usage` lint (default: warn) warns about unknown
775 * The `unknown_features` lint (default: warn) warns about unknown
777 * The `dead_code` lint (default: warn) checks for dead code.
778 * Rust libraries can be linked statically to one another
779 * `#[link_args]` is behind the `link_args` feature gate.
780 * Native libraries are now linked with `#[link(name = "foo")]`
781 * Native libraries can be statically linked to a rust crate
782 (`#[link(name = "foo", kind = "static")]`).
783 * Native OS X frameworks are now officially supported
784 (`#[link(name = "foo", kind = "framework")]`).
785 * The `#[thread_local]` attribute creates thread-local (not task-local)
786 variables. Currently behind the `thread_local` feature gate.
787 * The `return` keyword may be used in closures.
788 * Types that can be copied via a memcpy implement the `Pod` kind.
789 * The `cfg` attribute can now be used on struct fields and enum variants.
792 * std: The `option` and `result` API's have been overhauled to make them
793 simpler, more consistent, and more composable.
794 * std: The entire `std::io` module has been replaced with one that is
795 more comprehensive and that properly interfaces with the underlying
796 scheduler. File, TCP, UDP, Unix sockets, pipes, and timers are all
798 * std: `io::util` contains a number of useful implementations of
799 `Reader` and `Writer`, including `NullReader`, `NullWriter`,
800 `ZeroReader`, `TeeReader`.
801 * std: The reference counted pointer type `extra::rc` moved into std.
802 * std: The `Gc` type in the `gc` module will replace `@` (it is currently
803 just a wrapper around it).
804 * std: The `Either` type has been removed.
805 * std: `fmt::Default` can be implemented for any type to provide default
806 formatting to the `format!` macro, as in `format!("{}", myfoo)`.
807 * std: The `rand` API continues to be tweaked.
808 * std: The `rust_begin_unwind` function, useful for inserting breakpoints
809 on failure in gdb, is now named `rust_fail`.
810 * std: The `each_key` and `each_value` methods on `HashMap` have been
811 replaced by the `keys` and `values` iterators.
812 * std: Functions dealing with type size and alignment have moved from the
813 `sys` module to the `mem` module.
814 * std: The `path` module was written and API changed.
815 * std: `str::from_utf8` has been changed to cast instead of allocate.
816 * std: `starts_with` and `ends_with` methods added to vectors via the
817 `ImmutableEqVector` trait, which is in the prelude.
818 * std: Vectors can be indexed with the `get_opt` method, which returns `None`
819 if the index is out of bounds.
820 * std: Task failure no longer propagates between tasks, as the model was
821 complex, expensive, and incompatible with thread-based tasks.
822 * std: The `Any` type can be used for dynamic typing.
823 * std: `~Any` can be passed to the `fail!` macro and retrieved via
825 * std: Methods that produce iterators generally do not have an `_iter`
827 * std: `cell::Cell` and `cell::RefCell` can be used to introduce mutability
828 roots (mutable fields, etc.). Use instead of e.g. `@mut`.
829 * std: `util::ignore` renamed to `prelude::drop`.
830 * std: Slices have `sort` and `sort_by` methods via the `MutableVector`
832 * std: `vec::raw` has seen a lot of cleanup and API changes.
833 * std: The standard library no longer includes any C++ code, and very
834 minimal C, eliminating the dependency on libstdc++.
835 * std: Runtime scheduling and I/O functionality has been factored out into
836 extensible interfaces and is now implemented by two different crates:
837 libnative, for native threading and I/O; and libgreen, for green threading
838 and I/O. This paves the way for using the standard library in more limited
839 embedded environments.
840 * std: The `comm` module has been rewritten to be much faster, have a
841 simpler, more consistent API, and to work for both native and green
843 * std: All libuv dependencies have been moved into the rustuv crate.
844 * native: New implementations of runtime scheduling on top of OS threads.
845 * native: New native implementations of TCP, UDP, file I/O, process spawning,
847 * green: The green thread scheduler and message passing types are almost
849 * extra: The `flatpipes` module had bitrotted and was removed.
850 * extra: All crypto functions have been removed and Rust now has a policy of
851 not reimplementing crypto in the standard library. In the future crypto
852 will be provided by external crates with bindings to established libraries.
853 * extra: `c_vec` has been modernized.
854 * extra: The `sort` module has been removed. Use the `sort` method on
858 * The `rust` and `rusti` commands have been removed, due to lack of
860 * `rustdoc` was completely rewritten.
861 * `rustdoc` can test code examples in documentation.
862 * `rustpkg` can test packages with the argument, 'test'.
863 * `rustpkg` supports arbitrary dependencies, including C libraries.
864 * `rustc`'s support for generating debug info is improved again.
865 * `rustc` has better error reporting for unbalanced delimiters.
866 * `rustc`'s JIT support was removed due to bitrot.
867 * Executables and static libraries can be built with LTO (-Z lto)
868 * `rustc` adds a `--dep-info` flag for communicating dependencies to
871 Version 0.8 (September 2013)
872 --------------------------
874 * ~2200 changes, numerous bugfixes
877 * The `for` loop syntax has changed to work with the `Iterator` trait.
878 * At long last, unwinding works on Windows.
879 * Default methods are ready for use.
880 * Many trait inheritance bugs fixed.
881 * Owned and borrowed trait objects work more reliably.
882 * `copy` is no longer a keyword. It has been replaced by the `Clone` trait.
883 * rustc can omit emission of code for the `debug!` macro if it is passed
885 * mod.rs is now "blessed". When loading `mod foo;`, rustc will now look
886 for foo.rs, then foo/mod.rs, and will generate an error when both are
888 * Strings no longer contain trailing nulls. The new `std::c_str` module
889 provides new mechanisms for converting to C strings.
890 * The type of foreign functions is now `extern "C" fn` instead of `*u8'.
891 * The FFI has been overhauled such that foreign functions are called directly,
892 instead of through a stack-switching wrapper.
893 * Calling a foreign function must be done through a Rust function with the
894 `#[fixed_stack_segment]` attribute.
895 * The `externfn!` macro can be used to declare both a foreign function and
896 a `#[fixed_stack_segment]` wrapper at once.
897 * `pub` and `priv` modifiers on `extern` blocks are no longer parsed.
898 * `unsafe` is no longer allowed on extern fns - they are all unsafe.
899 * `priv` is disallowed everywhere except for struct fields and enum variants.
900 * `&T` (besides `&'static T`) is no longer allowed in `@T`.
901 * `ref` bindings in irrefutable patterns work correctly now.
902 * `char` is now prevented from containing invalid code points.
903 * Casting to `bool` is no longer allowed.
904 * `\0` is now accepted as an escape in chars and strings.
905 * `yield` is a reserved keyword.
906 * `typeof` is a reserved keyword.
907 * Crates may be imported by URL with `extern mod foo = "url";`.
908 * Explicit enum discriminants may be given as uints as in `enum E { V = 0u }`
909 * Static vectors can be initialized with repeating elements,
910 e.g. `static foo: [u8, .. 100]: [0, .. 100];`.
911 * Static structs can be initialized with functional record update,
912 e.g. `static foo: Foo = Foo { a: 5, .. bar };`.
913 * `cfg!` can be used to conditionally execute code based on the crate
914 configuration, similarly to `#[cfg(...)]`.
915 * The `unnecessary_qualification` lint detects unneeded module
916 prefixes (default: allow).
917 * Arithmetic operations have been implemented on the SIMD types in
918 `std::unstable::simd`.
919 * Exchange allocation headers were removed, reducing memory usage.
920 * `format!` implements a completely new, extensible, and higher-performance
921 string formatting system. It will replace `fmt!`.
922 * `print!` and `println!` write formatted strings (using the `format!`
923 extension) to stdout.
924 * `write!` and `writeln!` write formatted strings (using the `format!`
925 extension) to the new Writers in `std::rt::io`.
926 * The library section in which a function or static is placed may
927 be specified with `#[link_section = "..."]`.
928 * The `proto!` syntax extension for defining bounded message protocols
930 * `macro_rules!` is hygienic for `let` declarations.
931 * The `#[export_name]` attribute specifies the name of a symbol.
932 * `unreachable!` can be used to indicate unreachable code, and fails
936 * std: Transitioned to the new runtime, written in Rust.
937 * std: Added an experimental I/O library, `rt::io`, based on the new
939 * std: A new generic `range` function was added to the prelude, replacing
940 `uint::range` and friends.
941 * std: `range_rev` no longer exists. Since range is an iterator it can be
942 reversed with `range(lo, hi).invert()`.
943 * std: The `chain` method on option renamed to `and_then`; `unwrap_or_default`
944 renamed to `unwrap_or`.
945 * std: The `iterator` module was renamed to `iter`.
946 * std: Integral types now support the `checked_add`, `checked_sub`, and
947 `checked_mul` operations for detecting overflow.
948 * std: Many methods in `str`, `vec`, `option, `result` were renamed for
950 * std: Methods are standardizing on conventions for casting methods:
951 `to_foo` for copying, `into_foo` for moving, `as_foo` for temporary
953 * std: The `CString` type in `c_str` provides new ways to convert to and
955 * std: `DoubleEndedIterator` can yield elements in two directions.
956 * std: The `mut_split` method on vectors partitions an `&mut [T]` into
958 * std: `str::from_bytes` renamed to `str::from_utf8`.
959 * std: `pop_opt` and `shift_opt` methods added to vectors.
960 * std: The task-local data interface no longer uses @, and keys are
961 no longer function pointers.
962 * std: The `swap_unwrap` method of `Option` renamed to `take_unwrap`.
963 * std: Added `SharedPort` to `comm`.
964 * std: `Eq` has a default method for `ne`; only `eq` is required
966 * std: `Ord` has default methods for `le`, `gt` and `ge`; only `lt`
967 is required in implementations.
968 * std: `is_utf8` performance is improved, impacting many string functions.
969 * std: `os::MemoryMap` provides cross-platform mmap.
970 * std: `ptr::offset` is now unsafe, but also more optimized. Offsets that
971 are not 'in-bounds' are considered undefined.
972 * std: Many freestanding functions in `vec` removed in favor of methods.
973 * std: Many freestanding functions on scalar types removed in favor of
975 * std: Many options to task builders were removed since they don't make
976 sense in the new scheduler design.
977 * std: More containers implement `FromIterator` so can be created by the
979 * std: More complete atomic types in `unstable::atomics`.
980 * std: `comm::PortSet` removed.
981 * std: Mutating methods in the `Set` and `Map` traits have been moved into
982 the `MutableSet` and `MutableMap` traits. `Container::is_empty`,
983 `Map::contains_key`, `MutableMap::insert`, and `MutableMap::remove` have
984 default implementations.
985 * std: Various `from_str` functions were removed in favor of a generic
986 `from_str` which is available in the prelude.
987 * std: `util::unreachable` removed in favor of the `unreachable!` macro.
988 * extra: `dlist`, the doubly-linked list was modernized.
989 * extra: Added a `hex` module with `ToHex` and `FromHex` traits.
990 * extra: Added `glob` module, replacing `std::os::glob`.
991 * extra: `rope` was removed.
992 * extra: `deque` was renamed to `ringbuf`. `RingBuf` implements `Deque`.
993 * extra: `net`, and `timer` were removed. The experimental replacements
994 are `std::rt::io::net` and `std::rt::io::timer`.
995 * extra: Iterators implemented for `SmallIntMap`.
996 * extra: Iterators implemented for `Bitv` and `BitvSet`.
997 * extra: `SmallIntSet` removed. Use `BitvSet`.
998 * extra: Performance of JSON parsing greatly improved.
999 * extra: `semver` updated to SemVer 2.0.0.
1000 * extra: `term` handles more terminals correctly.
1001 * extra: `dbg` module removed.
1002 * extra: `par` module removed.
1003 * extra: `future` was cleaned up, with some method renames.
1004 * extra: Most free functions in `getopts` were converted to methods.
1007 * rustc's debug info generation (`-Z debug-info`) is greatly improved.
1008 * rustc accepts `--target-cpu` to compile to a specific CPU architecture,
1009 similarly to gcc's `--march` flag.
1010 * rustc's performance compiling small crates is much better.
1011 * rustpkg has received many improvements.
1012 * rustpkg supports git tags as package IDs.
1013 * rustpkg builds into target-specific directories so it can be used for
1015 * The number of concurrent test tasks is controlled by the environment
1016 variable RUST_TEST_TASKS.
1017 * The test harness can now report metrics for benchmarks.
1018 * All tools have man pages.
1019 * Programs compiled with `--test` now support the `-h` and `--help` flags.
1020 * The runtime uses jemalloc for allocations.
1021 * Segmented stacks are temporarily disabled as part of the transition to
1022 the new runtime. Stack overflows are possible!
1023 * A new documentation backend, rustdoc_ng, is available for use. It is
1024 still invoked through the normal `rustdoc` command.
1026 Version 0.7 (July 2013)
1027 -----------------------
1029 * ~2000 changes, numerous bugfixes
1032 * `impl`s no longer accept a visibility qualifier. Put them on methods
1034 * The borrow checker has been rewritten with flow-sensitivity, fixing
1035 many bugs and inconveniences.
1036 * The `self` parameter no longer implicitly means `&'self self`,
1037 and can be explicitly marked with a lifetime.
1038 * Overloadable compound operators (`+=`, etc.) have been temporarily
1039 removed due to bugs.
1040 * The `for` loop protocol now requires `for`-iterators to return `bool`
1041 so they compose better.
1042 * The `Durable` trait is replaced with the `'static` bounds.
1043 * Trait default methods work more often.
1044 * Structs with the `#[packed]` attribute have byte alignment and
1045 no padding between fields.
1046 * Type parameters bound by `Copy` must now be copied explicitly with
1048 * It is now illegal to move out of a dereferenced unsafe pointer.
1049 * `Option<~T>` is now represented as a nullable pointer.
1050 * `@mut` does dynamic borrow checks correctly.
1051 * The `main` function is only detected at the topmost level of the crate.
1052 The `#[main]` attribute is still valid anywhere.
1053 * Struct fields may no longer be mutable. Use inherited mutability.
1054 * The `#[no_send]` attribute makes a type that would otherwise be
1056 * The `#[no_freeze]` attribute makes a type that would otherwise be
1058 * Unbounded recursion will abort the process after reaching the limit
1059 specified by the `RUST_MAX_STACK` environment variable (default: 1GB).
1060 * The `vecs_implicitly_copyable` lint mode has been removed. Vectors
1061 are never implicitly copyable.
1062 * `#[static_assert]` makes compile-time assertions about static bools.
1063 * At long last, 'argument modes' no longer exist.
1064 * The rarely used `use mod` statement no longer exists.
1067 * `fail!` and `assert!` accept `~str`, `&'static str` or `fmt!`-style
1069 * `Encodable`, `Decodable`, `Ord`, `TotalOrd`, `TotalEq`, `DeepClone`,
1070 `Rand`, `Zero` and `ToStr` can all be automatically derived with
1072 * The `bytes!` macro returns a vector of bytes for string, u8, char,
1073 and unsuffixed integer literals.
1076 * The `core` crate was renamed to `std`.
1077 * The `std` crate was renamed to `extra`.
1078 * More and improved documentation.
1079 * std: `iterator` module for external iterator objects.
1080 * Many old-style (internal, higher-order function) iterators replaced by
1081 implementations of `Iterator`.
1082 * std: Many old internal vector and string iterators,
1083 incl. `any`, `all`. removed.
1084 * std: The `finalize` method of `Drop` renamed to `drop`.
1085 * std: The `drop` method now takes `&mut self` instead of `&self`.
1086 * std: The prelude no longer reexports any modules, only types and traits.
1087 * std: Prelude additions: `print`, `println`, `FromStr`, `ApproxEq`, `Equiv`,
1088 `Iterator`, `IteratorUtil`, many numeric traits, many tuple traits.
1089 * std: New numeric traits: `Fractional`, `Real`, `RealExt`, `Integer`, `Ratio`,
1090 `Algebraic`, `Trigonometric`, `Exponential`, `Primitive`.
1091 * std: Tuple traits and accessors defined for up to 12-tuples, e.g.
1092 `(0, 1, 2).n2()` or `(0, 1, 2).n2_ref()`.
1093 * std: Many types implement `Clone`.
1094 * std: `path` type renamed to `Path`.
1095 * std: `mut` module and `Mut` type removed.
1096 * std: Many standalone functions removed in favor of methods and iterators
1097 in `vec`, `str`. In the future methods will also work as functions.
1098 * std: `reinterpret_cast` removed. Use `transmute`.
1099 * std: ascii string handling in `std::ascii`.
1100 * std: `Rand` is implemented for ~/@.
1101 * std: `run` module for spawning processes overhauled.
1102 * std: Various atomic types added to `unstable::atomic`.
1103 * std: Various types implement `Zero`.
1104 * std: `LinearMap` and `LinearSet` renamed to `HashMap` and `HashSet`.
1105 * std: Borrowed pointer functions moved from `ptr` to `borrow`.
1106 * std: Added `os::mkdir_recursive`.
1107 * std: Added `os::glob` function performs filesystems globs.
1108 * std: `FuzzyEq` renamed to `ApproxEq`.
1109 * std: `Map` now defines `pop` and `swap` methods.
1110 * std: `Cell` constructors converted to static methods.
1111 * extra: `rc` module adds the reference counted pointers, `Rc` and `RcMut`.
1112 * extra: `flate` module moved from `std` to `extra`.
1113 * extra: `fileinput` module for iterating over a series of files.
1114 * extra: `Complex` number type and `complex` module.
1115 * extra: `Rational` number type and `rational` module.
1116 * extra: `BigInt`, `BigUint` implement numeric and comparison traits.
1117 * extra: `term` uses terminfo now, is more correct.
1118 * extra: `arc` functions converted to methods.
1119 * extra: Implementation of fixed output size variations of SHA-2.
1122 * `unused_variable` lint mode for unused variables (default: warn).
1123 * `unused_unsafe` lint mode for detecting unnecessary `unsafe` blocks
1125 * `unused_mut` lint mode for identifying unused `mut` qualifiers
1127 * `dead_assignment` lint mode for unread variables (default: warn).
1128 * `unnecessary_allocation` lint mode detects some heap allocations that are
1129 immediately borrowed so could be written without allocating (default: warn).
1130 * `missing_doc` lint mode (default: allow).
1131 * `unreachable_code` lint mode (default: warn).
1132 * The `rusti` command has been rewritten and a number of bugs addressed.
1133 * rustc outputs in color on more terminals.
1134 * rustc accepts a `--link-args` flag to pass arguments to the linker.
1135 * rustc accepts a `-Z print-link-args` flag for debugging linkage.
1136 * Compiling with `-g` will make the binary record information about
1137 dynamic borrowcheck failures for debugging.
1138 * rustdoc has a nicer stylesheet.
1139 * Various improvements to rustdoc.
1140 * Improvements to rustpkg (see the detailed release notes).
1142 Version 0.6 (April 2013)
1143 ------------------------
1145 * ~2100 changes, numerous bugfixes
1148 * The self type parameter in traits is now spelled `Self`
1149 * The `self` parameter in trait and impl methods must now be explicitly
1150 named (for example: `fn f(&self) { }`). Implicit self is deprecated.
1151 * Static methods no longer require the `static` keyword and instead
1152 are distinguished by the lack of a `self` parameter
1153 * Replaced the `Durable` trait with the `'static` lifetime
1154 * The old closure type syntax with the trailing sigil has been
1155 removed in favor of the more consistent leading sigil
1156 * `super` is a keyword, and may be prefixed to paths
1157 * Trait bounds are separated with `+` instead of whitespace
1158 * Traits are implemented with `impl Trait for Type`
1159 instead of `impl Type: Trait`
1160 * Lifetime syntax is now `&'l foo` instead of `&l/foo`
1161 * The `export` keyword has finally been removed
1162 * The `move` keyword has been removed (see "Semantic changes")
1163 * The interior mutability qualifier on vectors, `[mut T]`, has been
1164 removed. Use `&mut [T]`, etc.
1165 * `mut` is no longer valid in `~mut T`. Use inherited mutability
1166 * `fail` is no longer a keyword. Use `fail!()`
1167 * `assert` is no longer a keyword. Use `assert!()`
1168 * `log` is no longer a keyword. use `debug!`, etc.
1169 * 1-tuples may be represented as `(T,)`
1170 * Struct fields may no longer be `mut`. Use inherited mutability,
1171 `@mut T`, `core::mut` or `core::cell`
1172 * `extern mod { ... }` is no longer valid syntax for foreign
1173 function modules. Use extern blocks: `extern { ... }`
1174 * Newtype enums removed. Use tuple-structs.
1175 * Trait implementations no longer support visibility modifiers
1176 * Pattern matching over vectors improved and expanded
1177 * `const` renamed to `static` to correspond to lifetime name,
1178 and make room for future `static mut` unsafe mutable globals.
1179 * Replaced `#[deriving_eq]` with `#[deriving(Eq)]`, etc.
1180 * `Clone` implementations can be automatically generated with
1181 `#[deriving(Clone)]`
1182 * Casts to traits must use a pointer sigil, e.g. `@foo as @Bar`
1183 instead of `foo as Bar`.
1184 * Fixed length vector types are now written as `[int, .. 3]`
1185 instead of `[int * 3]`.
1186 * Fixed length vector types can express the length as a constant
1187 expression. (ex: `[int, .. GL_BUFFER_SIZE - 2]`)
1190 * Types with owned pointers or custom destructors move by default,
1191 eliminating the `move` keyword
1192 * All foreign functions are considered unsafe
1193 * &mut is now unaliasable
1194 * Writes to borrowed @mut pointers are prevented dynamically
1196 * The name of the main function can be customized using #[main]
1197 * The default type of an inferred closure is &fn instead of @fn
1198 * `use` statements may no longer be "chained" - they cannot import
1199 identifiers imported by previous `use` statements
1200 * `use` statements are crate relative, importing from the "top"
1201 of the crate by default. Paths may be prefixed with `super::`
1202 or `self::` to change the search behavior.
1203 * Method visibility is inherited from the implementation declaration
1204 * Structural records have been removed
1205 * Many more types can be used in static items, including enums
1206 'static-lifetime pointers and vectors
1207 * Pattern matching over vectors improved and expanded
1208 * Typechecking of closure types has been overhauled to
1209 improve inference and eliminate unsoundness
1210 * Macros leave scope at the end of modules, unless that module is
1211 tagged with #[macro_escape]
1214 * Added big integers to `std::bigint`
1215 * Removed `core::oldcomm` module
1216 * Added pipe-based `core::comm` module
1217 * Numeric traits have been reorganized under `core::num`
1218 * `vec::slice` finally returns a slice
1219 * `debug!` and friends don't require a format string, e.g. `debug!(Foo)`
1220 * Containers reorganized around traits in `core::container`
1221 * `core::dvec` removed, `~[T]` is a drop-in replacement
1222 * `core::send_map` renamed to `core::hashmap`
1223 * `std::map` removed; replaced with `core::hashmap`
1224 * `std::treemap` reimplemented as an owned balanced tree
1225 * `std::deque` and `std::smallintmap` reimplemented as owned containers
1226 * `core::trie` added as a fast ordered map for integer keys
1227 * Set types added to `core::hashmap`, `core::trie` and `std::treemap`
1228 * `Ord` split into `Ord` and `TotalOrd`. `Ord` is still used to
1229 overload the comparison operators, whereas `TotalOrd` is used
1230 by certain container types
1233 * Replaced the 'cargo' package manager with 'rustpkg'
1234 * Added all-purpose 'rust' tool
1235 * `rustc --test` now supports benchmarks with the `#[bench]` attribute
1236 * rustc now *attempts* to offer spelling suggestions
1237 * Improved support for ARM and Android
1238 * Preliminary MIPS backend
1239 * Improved foreign function ABI implementation for x86, x86_64
1240 * Various memory usage improvements
1241 * Rust code may be embedded in foreign code under limited circumstances
1242 * Inline assembler supported by new asm!() syntax extension.
1244 Version 0.5 (December 2012)
1245 ---------------------------
1247 * ~900 changes, numerous bugfixes
1250 * Removed `<-` move operator
1251 * Completed the transition from the `#fmt` extension syntax to `fmt!`
1252 * Removed old fixed length vector syntax - `[T]/N`
1253 * New token-based quasi-quoters, `quote_tokens!`, `quote_expr!`, etc.
1254 * Macros may now expand to items and statements
1255 * `a.b()` is always parsed as a method call, never as a field projection
1256 * `Eq` and `IterBytes` implementations can be automatically generated
1257 with `#[deriving_eq]` and `#[deriving_iter_bytes]` respectively
1258 * Removed the special crate language for `.rc` files
1259 * Function arguments may consist of any irrefutable pattern
1262 * `&` and `~` pointers may point to objects
1263 * Tuple structs - `struct Foo(Bar, Baz)`. Will replace newtype enums.
1264 * Enum variants may be structs
1265 * Destructors can be added to all nominal types with the Drop trait
1266 * Structs and nullary enum variants may be constants
1267 * Values that cannot be implicitly copied are now automatically moved
1268 without writing `move` explicitly
1269 * `&T` may now be coerced to `*T`
1270 * Coercions happen in `let` statements as well as function calls
1271 * `use` statements now take crate-relative paths
1272 * The module and type namespaces have been merged so that static
1273 method names can be resolved under the trait in which they are
1276 * Improved support for language features
1277 * Trait inheritance works in many scenarios
1278 * More support for explicit self arguments in methods - `self`, `&self`
1279 `@self`, and `~self` all generally work as expected
1280 * Static methods work in more situations
1281 * Experimental: Traits may declare default methods for the implementations
1285 * New condition handling system in `core::condition`
1286 * Timsort added to `std::sort`
1287 * New priority queue, `std::priority_queue`
1288 * Pipes for serializable types, `std::flatpipes'
1289 * Serialization overhauled to be trait-based
1290 * Expanded `getopts` definitions
1291 * Moved futures to `std`
1292 * More functions are pure now
1293 * `core::comm` renamed to `oldcomm`. Still deprecated
1294 * `rustdoc` and `cargo` are libraries now
1297 * Added a preliminary REPL, `rusti`
1298 * License changed from MIT to dual MIT/APL2
1300 Version 0.4 (October 2012)
1301 --------------------------
1303 * ~2000 changes, numerous bugfixes
1306 * All keywords are now strict and may not be used as identifiers anywhere
1307 * Keyword removal: 'again', 'import', 'check', 'new', 'owned', 'send',
1308 'of', 'with', 'to', 'class'.
1309 * Classes are replaced with simpler structs
1310 * Explicit method self types
1311 * `ret` became `return` and `alt` became `match`
1312 * `import` is now `use`; `use is now `extern mod`
1313 * `extern mod { ... }` is now `extern { ... }`
1314 * `use mod` is the recommended way to import modules
1315 * `pub` and `priv` replace deprecated export lists
1316 * The syntax of `match` pattern arms now uses fat arrow (=>)
1317 * `main` no longer accepts an args vector; use `os::args` instead
1320 * Trait implementations are now coherent, ala Haskell typeclasses
1321 * Trait methods may be static
1322 * Argument modes are deprecated
1323 * Borrowed pointers are much more mature and recommended for use
1324 * Strings and vectors in the static region are stored in constant memory
1325 * Typestate was removed
1326 * Resolution rewritten to be more reliable
1327 * Support for 'dual-mode' data structures (freezing and thawing)
1330 * Most binary operators can now be overloaded via the traits in
1332 * `std::net::url` for representing URLs
1333 * Sendable hash maps in `core::send_map`
1334 * `core::task' gained a (currently unsafe) task-local storage API
1337 * An efficient new intertask communication primitive called the pipe,
1338 along with a number of higher-level channel types, in `core::pipes`
1339 * `std::arc`, an atomically reference counted, immutable, shared memory
1341 * `std::sync`, various exotic synchronization tools based on arcs and pipes
1342 * Futures are now based on pipes and sendable
1343 * More robust linked task failure
1344 * Improved task builder API
1347 * Improved error reporting
1348 * Preliminary JIT support
1349 * Preliminary work on precise GC
1350 * Extensive architectural improvements to rustc
1351 * Begun a transition away from buggy C++-based reflection (shape) code to
1352 Rust-based (visitor) code
1353 * All hash functions and tables converted to secure, randomized SipHash
1355 Version 0.3 (July 2012)
1356 ------------------------
1358 * ~1900 changes, numerous bugfixes
1360 * New coding conveniences
1361 * Integer-literal suffix inference
1362 * Per-item control over warnings, errors
1363 * #[cfg(windows)] and #[cfg(unix)] attributes
1364 * Documentation comments
1365 * More compact closure syntax
1366 * 'do' expressions for treating higher-order functions as
1368 * *-patterns (wildcard extended to all constructor fields)
1371 * Name resolution pass and exhaustiveness checker rewritten
1372 * Region pointers and borrow checking supersede alias
1374 * Init-ness checking is now provided by a region-based liveness
1375 pass instead of the typestate pass; same for last-use analysis
1376 * Extensive work on region pointers
1378 * Experimental new language features
1379 * Slices and fixed-size, interior-allocated vectors
1380 * #!-comments for lang versioning, shell execution
1381 * Destructors and iface implementation for classes;
1382 type-parameterized classes and class methods
1383 * 'const' type kind for types that can be used to implement
1384 shared-memory concurrency patterns
1388 * Removal of various obsolete features
1389 * Keywords: 'be', 'prove', 'syntax', 'note', 'mutable', 'bind',
1390 'crust', 'native' (now 'extern'), 'cont' (now 'again')
1392 * Constructs: do-while loops ('do' repurposed), fn binding,
1393 resources (replaced by destructors)
1395 * Compiler reorganization
1396 * Syntax-layer of compiler split into separate crate
1397 * Clang (from LLVM project) integrated into build
1398 * Typechecker split into sub-modules
1401 * New time functions
1402 * Extension methods for many built-in types
1403 * Arc: atomic-refcount read-only / exclusive-use shared cells
1404 * Par: parallel map and search routines
1405 * Extensive work on libuv interface
1406 * Much vector code moved to libraries
1407 * Syntax extensions: #line, #col, #file, #mod, #stringify,
1408 #include, #include_str, #include_bin
1411 * Cargo automatically resolves dependencies
1413 Version 0.2 (March 2012)
1414 -------------------------
1416 * >1500 changes, numerous bugfixes
1418 * New docs and doc tooling
1420 * New port: FreeBSD x86_64
1422 * Compilation model enhancements
1423 * Generics now specialized, multiply instantiated
1424 * Functions now inlined across separate crates
1426 * Scheduling, stack and threading fixes
1427 * Noticeably improved message-passing performance
1428 * Explicit schedulers
1432 * Experimental new language features
1433 * Operator overloading
1437 * Various language extensions
1438 * C-callback function types: 'crust fn ...'
1439 * Infinite-loop construct: 'loop { ... }'
1440 * Shorten 'mutable' to 'mut'
1441 * Required mutable-local qualifier: 'let mut ...'
1442 * Basic glob-exporting: 'export foo::*;'
1443 * Alt now exhaustive, 'alt check' for runtime-checked
1444 * Block-function form of 'for' loop, with 'break' and 'ret'.
1447 * AST quasi-quote syntax extension
1448 * Revived libuv interface
1449 * New modules: core::{future, iter}, std::arena
1450 * Merged per-platform std::{os*, fs*} to core::{libc, os}
1451 * Extensive cleanup, regularization in libstd, libcore
1453 Version 0.1 (January 20, 2012)
1454 -------------------------------
1456 * Most language features work, including:
1457 * Unique pointers, unique closures, move semantics
1458 * Interface-constrained generics
1459 * Static interface dispatch
1461 * Multithread task scheduling
1462 * Typestate predicates
1463 * Failure unwinding, destructors
1464 * Pattern matching and destructuring assignment
1465 * Lightweight block-lambda syntax
1466 * Preliminary macro-by-example
1468 * Compiler works with the following configurations:
1469 * Linux: x86 and x86_64 hosts and targets
1470 * MacOS: x86 and x86_64 hosts and targets
1471 * Windows: x86 hosts and targets
1473 * Cross compilation / multi-target configuration supported.
1475 * Preliminary API-documentation and package-management tools included.
1479 * Documentation is incomplete.
1481 * Performance is below intended target.
1483 * Standard library APIs are subject to extensive change, reorganization.
1485 * Language-level versioning is not yet operational - future code will