|
| 1 | +Version 1.28.0 (2018-08-02) |
| 2 | +=========================== |
| 3 | + |
| 4 | +Language |
| 5 | +-------- |
| 6 | +- [The `#[repr(transparent)]` attribute is now stable.][51562] This attribute |
| 7 | + allows a Rust newtype wrapper (`struct NewType<T>(T);`) to be represented as |
| 8 | + the inner type across Foreign Function Interface (FFI) boundaries. |
| 9 | +- [The keywords `pure`, `sizeof`, `alignof`, and `offsetof` have been unreserved |
| 10 | + and can now be used as identifiers.][51196] |
| 11 | +- [The `GlobalAlloc` trait and `#[global_allocator]` attribute are now |
| 12 | + stable.][51241] This will allow users to specify a global allocator for |
| 13 | + their program. |
| 14 | +- [Unit test functions marked with the `#[test]` attribute can now return |
| 15 | + `Result<(), E: Debug>` in addition to `()`.][51298] |
| 16 | +- [The `lifetime` specifier for `macro_rules!` is now stable.][50385] This |
| 17 | + allows macros to easily target lifetimes. |
| 18 | + |
| 19 | +Compiler |
| 20 | +-------- |
| 21 | +- [The `s` and `z` optimisation levels are now stable.][50265] These optimisations |
| 22 | + prioritise making smaller binary sizes. `z` is the same as `s` with the |
| 23 | + exception that it does not vectorise loops, which typically results in an even |
| 24 | + smaller binary. |
| 25 | +- [The short error format is now stable.][49546] Specified with |
| 26 | + `--error-format=short` this option will provide a more compressed output of |
| 27 | + rust error messages. |
| 28 | +- [Added a lint warning when you have duplicated `macro_export`s.][50143] |
| 29 | +- [Reduced the number of allocations in the macro parser.][50855] This can |
| 30 | + improve compile times of macro heavy crates on average by 5%. |
| 31 | + |
| 32 | +Libraries |
| 33 | +--------- |
| 34 | +- [Implemented `Default` for `&mut str`.][51306] |
| 35 | +- [Implemented `From<bool>` for all integer and unsigned number types.][50554] |
| 36 | +- [Implemented `Extend` for `()`.][50234] |
| 37 | +- [The `Debug` implementation of `time::Duration` should now be more easily |
| 38 | + human readable.][50364] Previously a `Duration` of one second would printed as |
| 39 | + `Duration { secs: 1, nanos: 0 }` and will now be printed as `1s`. |
| 40 | +- [Implemented `From<&String>` for `Cow<str>`, `From<&Vec<T>>` for `Cow<[T]>`, |
| 41 | + `From<Cow<CStr>>` for `CString`, `From<CString>, From<CStr>, From<&CString>` |
| 42 | + for `Cow<CStr>`, `From<OsString>, From<OsStr>, From<&OsString>` for |
| 43 | + `Cow<OsStr>`, `From<&PathBuf>` for `Cow<Path>`, and `From<Cow<Path>>` |
| 44 | + for `PathBuf`.][50170] |
| 45 | +- [Implemented `Shl` and `Shr` for `Wrapping<u128>` |
| 46 | + and `Wrapping<i128>`.][50465] |
| 47 | +- [`DirEntry::metadata` now uses `fstatat` instead of `lstat` when |
| 48 | + possible.][51050] This can provide up to a 40% speed increase. |
| 49 | +- [Improved error messages when using `format!`.][50610] |
| 50 | + |
| 51 | +Stabilized APIs |
| 52 | +--------------- |
| 53 | +- [`Iterator::step_by`] |
| 54 | +- [`Path::ancestors`] |
| 55 | +- [`btree_map::Entry::or_default`] |
| 56 | +- [`fmt::Alignment`] |
| 57 | +- [`hash_map::Entry::or_default`] |
| 58 | +- [`iter::repeat_with`] |
| 59 | +- [`num::NonZeroUsize`] |
| 60 | +- [`num::NonZeroU128`] |
| 61 | +- [`num::NonZeroU16`] |
| 62 | +- [`num::NonZeroU32`] |
| 63 | +- [`num::NonZeroU64`] |
| 64 | +- [`num::NonZeroU8`] |
| 65 | +- [`ops::RangeBounds`] |
| 66 | +- [`slice::SliceIndex`] |
| 67 | +- [`slice::from_mut`] |
| 68 | +- [`slice::from_ref`] |
| 69 | +- [`{Any + Send + Sync}::downcast_mut`] |
| 70 | +- [`{Any + Send + Sync}::downcast_ref`] |
| 71 | +- [`{Any + Send + Sync}::is`] |
| 72 | + |
| 73 | +Cargo |
| 74 | +----- |
| 75 | +- [Cargo will now no longer allow you to publish crates with build scripts that |
| 76 | + modify the `src` directory.][cargo/5584] The `src` directory in a crate should be |
| 77 | + considered to be immutable. |
| 78 | + |
| 79 | +Misc |
| 80 | +---- |
| 81 | +- [The `suggestion_applicability` field in `rustc`'s json output is now |
| 82 | + stable.][50486] This will allow dev tools to check whether a code suggestion |
| 83 | + would apply to them. |
| 84 | + |
| 85 | +Compatibility Notes |
| 86 | +------------------- |
| 87 | +- [Rust will no longer consider trait objects with duplicated constraints to |
| 88 | + have implementations.][51276] For example the below code will now fail |
| 89 | + to compile. |
| 90 | + ```rust |
| 91 | + trait Trait {} |
| 92 | + |
| 93 | + impl Trait + Send { |
| 94 | + fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test` |
| 95 | + } |
| 96 | + |
| 97 | + impl Trait + Send + Send { |
| 98 | + fn test(&self) { println!("two"); } |
| 99 | + } |
| 100 | + ``` |
| 101 | + |
| 102 | +[49546]: https://github.com/rust-lang/rust/pull/49546/ |
| 103 | +[50143]: https://github.com/rust-lang/rust/pull/50143/ |
| 104 | +[50170]: https://github.com/rust-lang/rust/pull/50170/ |
| 105 | +[50234]: https://github.com/rust-lang/rust/pull/50234/ |
| 106 | +[50265]: https://github.com/rust-lang/rust/pull/50265/ |
| 107 | +[50364]: https://github.com/rust-lang/rust/pull/50364/ |
| 108 | +[50385]: https://github.com/rust-lang/rust/pull/50385/ |
| 109 | +[50465]: https://github.com/rust-lang/rust/pull/50465/ |
| 110 | +[50486]: https://github.com/rust-lang/rust/pull/50486/ |
| 111 | +[50554]: https://github.com/rust-lang/rust/pull/50554/ |
| 112 | +[50610]: https://github.com/rust-lang/rust/pull/50610/ |
| 113 | +[50855]: https://github.com/rust-lang/rust/pull/50855/ |
| 114 | +[51050]: https://github.com/rust-lang/rust/pull/51050/ |
| 115 | +[51196]: https://github.com/rust-lang/rust/pull/51196/ |
| 116 | +[51200]: https://github.com/rust-lang/rust/pull/51200/ |
| 117 | +[51241]: https://github.com/rust-lang/rust/pull/51241/ |
| 118 | +[51276]: https://github.com/rust-lang/rust/pull/51276/ |
| 119 | +[51298]: https://github.com/rust-lang/rust/pull/51298/ |
| 120 | +[51306]: https://github.com/rust-lang/rust/pull/51306/ |
| 121 | +[51562]: https://github.com/rust-lang/rust/pull/51562/ |
| 122 | +[cargo/5584]: https://github.com/rust-lang/cargo/pull/5584/ |
| 123 | +[`Iterator::step_by`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.step_by |
| 124 | +[`Path::ancestors`]: https://doc.rust-lang.org/std/path/struct.Path.html#method.ancestors |
| 125 | +[`btree_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.or_default |
| 126 | +[`fmt::Alignment`]: https://doc.rust-lang.org/std/fmt/enum.Alignment.html |
| 127 | +[`hash_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.or_default |
| 128 | +[`iter::repeat_with`]: https://doc.rust-lang.org/std/iter/fn.repeat_with.html |
| 129 | +[`num::NonZeroUsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroUsize.html |
| 130 | +[`num::NonZeroU128`]: https://doc.rust-lang.org/std/num/struct.NonZeroU128.html |
| 131 | +[`num::NonZeroU16`]: https://doc.rust-lang.org/std/num/struct.NonZeroU16.html |
| 132 | +[`num::NonZeroU32`]: https://doc.rust-lang.org/std/num/struct.NonZeroU32.html |
| 133 | +[`num::NonZeroU64`]: https://doc.rust-lang.org/std/num/struct.NonZeroU64.html |
| 134 | +[`num::NonZeroU8`]: https://doc.rust-lang.org/std/num/struct.NonZeroU8.html |
| 135 | +[`ops::RangeBounds`]: https://doc.rust-lang.org/std/ops/trait.RangeBounds.html |
| 136 | +[`slice::SliceIndex`]: https://doc.rust-lang.org/std/slice/trait.SliceIndex.html |
| 137 | +[`slice::from_mut`]: https://doc.rust-lang.org/std/slice/fn.from_mut.html |
| 138 | +[`slice::from_ref`]: https://doc.rust-lang.org/std/slice/fn.from_ref.html |
| 139 | +[`{Any + Send + Sync}::downcast_mut`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_mut-2 |
| 140 | +[`{Any + Send + Sync}::downcast_ref`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref-2 |
| 141 | +[`{Any + Send + Sync}::is`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.is-2 |
| 142 | + |
| 143 | +Version 1.27.1 (2018-07-10) |
| 144 | +=========================== |
| 145 | + |
| 146 | +Security Notes |
| 147 | +-------------- |
| 148 | + |
| 149 | +- rustdoc would execute plugins in the /tmp/rustdoc/plugins directory |
| 150 | + when running, which enabled executing code as some other user on a |
| 151 | + given machine. This release fixes that vulnerability; you can read |
| 152 | + more about this on the [blog][rustdoc-sec]. The associated CVE is [CVE-2018-1000622]. |
| 153 | + |
| 154 | + Thank you to Red Hat for responsibily disclosing this vulnerability to us. |
| 155 | + |
| 156 | +Compatibility Notes |
| 157 | +------------------- |
| 158 | + |
| 159 | +- The borrow checker was fixed to avoid an additional potential unsoundness when using |
| 160 | + match ergonomics: [#51415][51415], [#49534][49534]. |
| 161 | + |
| 162 | +[51415]: https://github.com/rust-lang/rust/issues/51415 |
| 163 | +[49534]: https://github.com/rust-lang/rust/issues/49534 |
| 164 | +[rustdoc-sec]: https://blog.rust-lang.org/2018/07/06/security-advisory-for-rustdoc.html |
| 165 | +[CVE-2018-1000622]: https://cve.mitre.org/cgi-bin/cvename.cgi?name=%20CVE-2018-1000622 |
| 166 | + |
1 | 167 | Version 1.27.0 (2018-06-21)
|
2 | 168 | ==========================
|
3 | 169 |
|
@@ -188,7 +354,7 @@ Language
|
188 | 354 | - [Closures now implement `Copy` and/or `Clone` if all captured variables
|
189 | 355 | implement either or both traits.][49299]
|
190 | 356 | - [The inclusive range syntax e.g. `for x in 0..=10` is now stable.][47813]
|
191 |
| -- [Stablise `'_`. The underscore lifetime can be used anywhere where a |
| 357 | +- [The `'_` lifetime is now stable. The underscore lifetime can be used anywhere where a |
192 | 358 | lifetime can be elided.][49458]
|
193 | 359 | - [`impl Trait` is now stable allowing you to have abstract types in returns
|
194 | 360 | or in function parameters.][49255] e.g. `fn foo() -> impl Iterator<Item=u8>` or
|
@@ -389,7 +555,7 @@ Version 1.25.0 (2018-03-29)
|
389 | 555 |
|
390 | 556 | Language
|
391 | 557 | --------
|
392 |
| -- [Stabilised `#[repr(align(x))]`.][47006] [RFC 1358] |
| 558 | +- [The `#[repr(align(x))]` attribute is now stable.][47006] [RFC 1358] |
393 | 559 | - [You can now use nested groups of imports.][47948]
|
394 | 560 | e.g. `use std::{fs::File, io::Read, path::{Path, PathBuf}};`
|
395 | 561 | - [You can now have `|` at the start of a match arm.][47947] e.g.
|
|
0 commit comments