Skip to content

Commit 1bf2bca

Browse files
Aaron Powerpietroalbini
Aaron Power
authored andcommitted
Updated RELEASES.md for 1.32.0
1 parent e3f88cb commit 1bf2bca

File tree

1 file changed

+263
-0
lines changed

1 file changed

+263
-0
lines changed

RELEASES.md

Lines changed: 263 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,266 @@
1+
Version 1.32.0 (2019-01-17)
2+
==========================
3+
4+
Language
5+
--------
6+
#### 2018 edition
7+
- [You can now use the `?` operator in macro definitions.][56245] The `?`
8+
operator allows you to specify zero or one repetitions similar to the `*` and
9+
`+` operators.
10+
11+
#### All editions
12+
- [You can now match against `PhantomData<T>` types.][55837]
13+
- [You can now match against literals in macros with the `literal`
14+
specifier.][56072] This will match against a literal of any type.
15+
E.g. `1`, `'A'`, `"Hello World"`
16+
- [Self can now be used as a constructor and pattern.][56365] E.g.
17+
```rust
18+
struct Point(i32, i32);
19+
20+
impl Point {
21+
pub fn new(x: i32, y: i32) -> Self {
22+
Self(x, y)
23+
}
24+
25+
pub fn is_origin(&self) -> bool {
26+
match self {
27+
Self(0, 0) => true,
28+
_ => false,
29+
}
30+
}
31+
}
32+
```
33+
- [Self can also now be used in type definitions.][56366] E.g.
34+
```rust
35+
enum List<T>
36+
where
37+
Self: PartialOrd<Self> // can write `Self` instead of `List<T>`
38+
{
39+
Nil,
40+
Cons(T, Box<Self>) // likewise here
41+
}
42+
```
43+
44+
Compiler
45+
--------
46+
- [You can now mark traits with `#[must_use]`.][55663] Providing a warning if
47+
they unused in a program.
48+
- [The default allocator has changed from jemalloc to the default allocator on
49+
your system.][55238] The compiler itself on Linux & macOS will still use
50+
jemalloc, but programs compiled with them will use the system allocator.
51+
- [Added the `aarch64-pc-windows-msvc` target.][55702]
52+
53+
Libraries
54+
---------
55+
- [`PathBuf` now implements `FromStr`.][55148]
56+
- [`Box<[T]>` now implements `FromIterator<T>`.][55843]
57+
- [The `dbg!` macro has been stabilized.][56395] This macro enables you to
58+
easily debug expressions in your rust program. E.g.
59+
```rust
60+
let a = 2;
61+
let b = dbg!(a * 2) + 1;
62+
// ^-- prints: [src/main.rs:4] a * 2 = 4
63+
assert_eq!(b, 5);
64+
```
65+
66+
The following APIs are now `const` functions and can be used in a
67+
`const` context.
68+
69+
- [`Cell::as_ptr`]
70+
- [`UnsafeCell::get`]
71+
- [`char::is_ascii`]
72+
- [`iter::empty`]
73+
- [`ManuallyDrop::new`]
74+
- [`ManuallyDrop::into_inner`]
75+
- [`RangeInclusive::start`]
76+
- [`RangeInclusive::end`]
77+
- [`NonNull::as_ptr`]
78+
- [`[T]::as_ptr`]
79+
- [`str::as_ptr`]
80+
- [`Duration::as_secs`]
81+
- [`Duration::subsec_millis`]
82+
- [`Duration::subsec_micros`]
83+
- [`Duration::subsec_nanos`]
84+
- [`CStr::as_ptr`]
85+
- [`Ipv4Addr::is_unspecified`]
86+
- [`Ipv6Addr::new`]
87+
- [`Ipv6Addr::octets`]
88+
89+
Stabilized APIs
90+
---------------
91+
- [`i8::to_be_bytes`]
92+
- [`i8::to_le_bytes`]
93+
- [`i8::to_ne_bytes`]
94+
- [`i8::from_be_bytes`]
95+
- [`i8::from_le_bytes`]
96+
- [`i8::from_ne_bytes`]
97+
- [`i16::to_be_bytes`]
98+
- [`i16::to_le_bytes`]
99+
- [`i16::to_ne_bytes`]
100+
- [`i16::from_be_bytes`]
101+
- [`i16::from_le_bytes`]
102+
- [`i16::from_ne_bytes`]
103+
- [`i32::to_be_bytes`]
104+
- [`i32::to_le_bytes`]
105+
- [`i32::to_ne_bytes`]
106+
- [`i32::from_be_bytes`]
107+
- [`i32::from_le_bytes`]
108+
- [`i32::from_ne_bytes`]
109+
- [`i64::to_be_bytes`]
110+
- [`i64::to_le_bytes`]
111+
- [`i64::to_ne_bytes`]
112+
- [`i64::from_be_bytes`]
113+
- [`i64::from_le_bytes`]
114+
- [`i64::from_ne_bytes`]
115+
- [`isize::to_be_bytes`]
116+
- [`isize::to_le_bytes`]
117+
- [`isize::to_ne_bytes`]
118+
- [`isize::from_be_bytes`]
119+
- [`isize::from_le_bytes`]
120+
- [`isize::from_ne_bytes`]
121+
- [`u8::to_be_bytes`]
122+
- [`u8::to_le_bytes`]
123+
- [`u8::to_ne_bytes`]
124+
- [`u8::from_be_bytes`]
125+
- [`u8::from_le_bytes`]
126+
- [`u8::from_ne_bytes`]
127+
- [`u16::to_be_bytes`]
128+
- [`u16::to_le_bytes`]
129+
- [`u16::to_ne_bytes`]
130+
- [`u16::from_be_bytes`]
131+
- [`u16::from_le_bytes`]
132+
- [`u16::from_ne_bytes`]
133+
- [`u32::to_be_bytes`]
134+
- [`u32::to_le_bytes`]
135+
- [`u32::to_ne_bytes`]
136+
- [`u32::from_be_bytes`]
137+
- [`u32::from_le_bytes`]
138+
- [`u32::from_ne_bytes`]
139+
- [`u64::to_be_bytes`]
140+
- [`u64::to_le_bytes`]
141+
- [`u64::to_ne_bytes`]
142+
- [`u64::from_be_bytes`]
143+
- [`u64::from_le_bytes`]
144+
- [`u64::from_ne_bytes`]
145+
- [`usize::to_be_bytes`]
146+
- [`usize::to_le_bytes`]
147+
- [`usize::to_ne_bytes`]
148+
- [`usize::from_be_bytes`]
149+
- [`usize::from_le_bytes`]
150+
- [`usize::from_ne_bytes`]
151+
152+
Cargo
153+
-----
154+
- [You can now run `cargo c` as an alias for `cargo check`.][cargo/6218]
155+
- [Usernames are now allowed in alt registry URLs.][cargo/6242]
156+
157+
Misc
158+
----
159+
- [`libproc_macro` has been added to the `rust-src` distribution.][55280]
160+
161+
Compatibility Notes
162+
-------------------
163+
- [The argument types for AVX's
164+
`_mm256_stream_si256`, `_mm256_stream_pd`, `_mm256_stream_ps`][55610] have
165+
been changed from `*const` to `*mut` as the previous implementation
166+
was unsound.
167+
168+
[55148]: https://github.com/rust-lang/rust/pull/55148/
169+
[55238]: https://github.com/rust-lang/rust/pull/55238/
170+
[55280]: https://github.com/rust-lang/rust/pull/55280/
171+
[55610]: https://github.com/rust-lang/rust/pull/55610/
172+
[55663]: https://github.com/rust-lang/rust/pull/55663/
173+
[55702]: https://github.com/rust-lang/rust/pull/55702/
174+
[55837]: https://github.com/rust-lang/rust/pull/55837/
175+
[55843]: https://github.com/rust-lang/rust/pull/55843/
176+
[56072]: https://github.com/rust-lang/rust/pull/56072/
177+
[56245]: https://github.com/rust-lang/rust/pull/56245/
178+
[56365]: https://github.com/rust-lang/rust/pull/56365/
179+
[56366]: https://github.com/rust-lang/rust/pull/56366/
180+
[56395]: https://github.com/rust-lang/rust/pull/56395/
181+
[cargo/6218]: https://github.com/rust-lang/cargo/pull/6218/
182+
[cargo/6242]: https://github.com/rust-lang/cargo/pull/6242/
183+
[`CStr::as_ptr`]: https://doc.rust-lang.org/std/ffi/struct.CStr.html#method.as_ptr
184+
[`Cell::as_ptr`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_ptr
185+
[`Duration::as_secs`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs
186+
[`Duration::subsec_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_micros
187+
[`Duration::subsec_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_millis
188+
[`Duration::subsec_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_nanos
189+
[`Ipv4Addr::is_unspecified`]: https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified
190+
[`Ipv6Addr::new`]: https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.new
191+
[`Ipv6Addr::octets`]: https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.octets
192+
[`ManuallyDrop::into_inner`]: https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html#method.into_inner
193+
[`ManuallyDrop::new`]: https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html#method.new
194+
[`NonNull::as_ptr`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.as_ptr
195+
[`RangeInclusive::end`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.end
196+
[`RangeInclusive::start`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.start
197+
[`UnsafeCell::get`]: https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html#method.get
198+
[`[T]::as_ptr`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr
199+
[`char::is_ascii`]: https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii
200+
[`i16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_be_bytes
201+
[`i16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_le_bytes
202+
[`i16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_ne_bytes
203+
[`i16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_be_bytes
204+
[`i16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_le_bytes
205+
[`i16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_ne_bytes
206+
[`i32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_be_bytes
207+
[`i32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_le_bytes
208+
[`i32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_ne_bytes
209+
[`i32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_be_bytes
210+
[`i32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_le_bytes
211+
[`i32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_ne_bytes
212+
[`i64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_be_bytes
213+
[`i64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_le_bytes
214+
[`i64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_ne_bytes
215+
[`i64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_be_bytes
216+
[`i64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_le_bytes
217+
[`i64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_ne_bytes
218+
[`i8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_be_bytes
219+
[`i8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_le_bytes
220+
[`i8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_ne_bytes
221+
[`i8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_be_bytes
222+
[`i8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_le_bytes
223+
[`i8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_ne_bytes
224+
[`isize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_be_bytes
225+
[`isize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_le_bytes
226+
[`isize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_ne_bytes
227+
[`isize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_be_bytes
228+
[`isize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_le_bytes
229+
[`isize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_ne_bytes
230+
[`iter::empty`]: https://doc.rust-lang.org/std/iter/fn.empty.html
231+
[`str::as_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_ptr
232+
[`u16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_be_bytes
233+
[`u16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_le_bytes
234+
[`u16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_ne_bytes
235+
[`u16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_be_bytes
236+
[`u16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_le_bytes
237+
[`u16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_ne_bytes
238+
[`u32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_be_bytes
239+
[`u32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_le_bytes
240+
[`u32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_ne_bytes
241+
[`u32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_be_bytes
242+
[`u32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_le_bytes
243+
[`u32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_ne_bytes
244+
[`u64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_be_bytes
245+
[`u64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_le_bytes
246+
[`u64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_ne_bytes
247+
[`u64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_be_bytes
248+
[`u64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_le_bytes
249+
[`u64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_ne_bytes
250+
[`u8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_be_bytes
251+
[`u8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_le_bytes
252+
[`u8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_ne_bytes
253+
[`u8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_be_bytes
254+
[`u8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_le_bytes
255+
[`u8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ne_bytes
256+
[`usize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_be_bytes
257+
[`usize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_le_bytes
258+
[`usize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_ne_bytes
259+
[`usize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_be_bytes
260+
[`usize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_le_bytes
261+
[`usize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_ne_bytes
262+
263+
1264
Version 1.31.1 (2018-12-20)
2265
===========================
3266

0 commit comments

Comments
 (0)