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