Skip to content

Commit 83eb33b

Browse files
Aaron Powerpietroalbini
authored andcommitted
Updated RELEASES for 1.28.0
1 parent 718e759 commit 83eb33b

File tree

1 file changed

+138
-0
lines changed

1 file changed

+138
-0
lines changed

RELEASES.md

Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,141 @@
1+
Version 1.28.0 (2018-08-02)
2+
===========================
3+
4+
Language
5+
--------
6+
- [Stabilised the `#[repr(transparent)]` attribute.][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+
- [Stabilised the `GlobalAlloc` trait and `#[global_allocator]`
12+
attribute.][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+
- [Stabilised a `lifetime` specifier to `macro_rules!` allowing macros to easily
17+
target lifetimes.][50385]
18+
19+
Compiler
20+
--------
21+
- [Stabilised the `s` and `z` optimisation levels.][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+
- [Stabilised the short error format.][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 }` 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+
- [`DirEntry::metadata` now uses `fstatat` instead of `lstat` when
46+
possible.][51050] This can provide up to a 40% speed increase.
47+
- [Improved error messages when using `format!`.][50610]
48+
49+
Stabilized APIs
50+
---------------
51+
- [`Iterator::step_by`]
52+
- [`Path::ancestors`]
53+
- [`btree_map::Entry::or_default`]
54+
- [`fmt::Alignment`]
55+
- [`hash_map::Entry::or_default`]
56+
- [`iter::repeat_with`]
57+
- [`num::NonZeroU128`]
58+
- [`num::NonZeroU16`]
59+
- [`num::NonZeroU32`]
60+
- [`num::NonZeroU64`]
61+
- [`num::NonZeroU8`]
62+
- [`ops::RangeBounds`]
63+
- [`slice::SliceIndex`]
64+
- [`slice::from_mut`]
65+
- [`slice::from_ref`]
66+
- [`{Any + Send + Sync}::downcast_mut`]
67+
- [`{Any + Send + Sync}::downcast_ref`]
68+
- [`{Any + Send + Sync}::is`]
69+
70+
Cargo
71+
-----
72+
- [Cargo will now no longer allow you to publish crates with build scripts that
73+
modify the `src` directory.][5584] The `src` directory in a crate should be
74+
considered to be immutable.
75+
76+
Misc
77+
----
78+
- [Stabilised the `suggestion_applicability` field in the json output.][50486]
79+
This will allow dev tools to check whether a code suggestion would apply
80+
to them.
81+
82+
Compatibility Notes
83+
-------------------
84+
- [Rust will no longer consider trait objects with duplicated constraints to
85+
have implementations.][51276] For example the below code will now fail
86+
to compile.
87+
```rust
88+
trait Trait {}
89+
90+
impl Trait + Send {
91+
fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test`
92+
}
93+
94+
impl Trait + Send + Send {
95+
fn test(&self) { println!("two"); }
96+
}
97+
```
98+
99+
[49546]: https://github.com/rust-lang/rust/pull/49546/
100+
[50143]: https://github.com/rust-lang/rust/pull/50143/
101+
[50170]: https://github.com/rust-lang/rust/pull/50170/
102+
[50234]: https://github.com/rust-lang/rust/pull/50234/
103+
[50265]: https://github.com/rust-lang/rust/pull/50265/
104+
[50364]: https://github.com/rust-lang/rust/pull/50364/
105+
[50385]: https://github.com/rust-lang/rust/pull/50385/
106+
[50486]: https://github.com/rust-lang/rust/pull/50486/
107+
[50554]: https://github.com/rust-lang/rust/pull/50554/
108+
[50610]: https://github.com/rust-lang/rust/pull/50610/
109+
[50855]: https://github.com/rust-lang/rust/pull/50855/
110+
[51050]: https://github.com/rust-lang/rust/pull/51050/
111+
[51196]: https://github.com/rust-lang/rust/pull/51196/
112+
[51200]: https://github.com/rust-lang/rust/pull/51200/
113+
[51241]: https://github.com/rust-lang/rust/pull/51241/
114+
[51276]: https://github.com/rust-lang/rust/pull/51276/
115+
[51298]: https://github.com/rust-lang/rust/pull/51298/
116+
[51306]: https://github.com/rust-lang/rust/pull/51306/
117+
[51562]: https://github.com/rust-lang/rust/pull/51562/
118+
[5584]: https://github.com/rust-lang/cargo/pull/5584/
119+
[`Iterator::step_by`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.step_by
120+
[`Path::ancestors`]: https://doc.rust-lang.org/std/path/struct.Path.html#method.ancestors
121+
[`btree_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.or_default
122+
[`fmt::Alignment`]: https://doc.rust-lang.org/std/fmt/enum.Alignment.html
123+
[`hash_map::Entry::or_default`]: https://doc.rust-lang.org/std/collections/btree_map/enum.Entry.html#method.or_default
124+
[`iter::repeat_with`]: https://doc.rust-lang.org/std/iter/fn.repeat_with.html
125+
[`num::NonZeroU128`]: https://doc.rust-lang.org/std/num/struct.NonZeroU128.html
126+
[`num::NonZeroU16`]: https://doc.rust-lang.org/std/num/struct.NonZeroU16.html
127+
[`num::NonZeroU32`]: https://doc.rust-lang.org/std/num/struct.NonZeroU32.html
128+
[`num::NonZeroU64`]: https://doc.rust-lang.org/std/num/struct.NonZeroU64.html
129+
[`num::NonZeroU8`]: https://doc.rust-lang.org/std/num/struct.NonZeroU8.html
130+
[`ops::RangeBounds`]: https://doc.rust-lang.org/std/ops/trait.RangeBounds.html
131+
[`slice::SliceIndex`]: https://doc.rust-lang.org/std/slice/trait.SliceIndex.html
132+
[`slice::from_mut`]: https://doc.rust-lang.org/std/slice/fn.from_mut.html
133+
[`slice::from_ref`]: https://doc.rust-lang.org/std/slice/fn.from_ref.html
134+
[`{Any + Send + Sync}::downcast_mut`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_mut-2
135+
[`{Any + Send + Sync}::downcast_ref`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.downcast_ref-2
136+
[`{Any + Send + Sync}::is`]: https://doc.rust-lang.org/std/any/trait.Any.html#method.is-2
137+
138+
1139
Version 1.27.0 (2018-06-21)
2140
==========================
3141

0 commit comments

Comments
 (0)