Skip to content

Commit cead378

Browse files
Backport release notes onto beta
1 parent 815f764 commit cead378

File tree

1 file changed

+98
-0
lines changed

1 file changed

+98
-0
lines changed

RELEASES.md

+98
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,100 @@
1+
Version 1.42.0 (2020-03-12)
2+
==========================
3+
4+
Language
5+
--------
6+
- [You can now use the slice pattern syntax with subslices.][67712] e.g.
7+
```rust
8+
fn foo(words: &[&str]) {
9+
match words {
10+
["Hello", "World", "!", ..] => println!("Hello World!"),
11+
["Foo", "Bar", ..] => println!("Baz"),
12+
rest => println!("{:?}", rest),
13+
}
14+
}
15+
```
16+
- [You can now use `#[repr(transparent)]` on univariant `enum`s.][68122] Meaning
17+
that you can create an enum that has the exact layout and ABI of the type
18+
it contains.
19+
- [There are some *syntax-only* changes:][67131]
20+
- `default` is syntactically allowed before items in `trait` definitions.
21+
- Items in `impl`s (i.e. `const`s, `type`s, and `fn`s) may syntactically
22+
leave out their bodies in favor of `;`.
23+
- Bounds on associated types in `impl`s are now syntactically allowed
24+
(e.g. `type Foo: Ord;`).
25+
- `...` (the C-variadic type) may occur syntactically directly as the type of
26+
any function parameter.
27+
28+
These are still rejected *semantically*, so you will likely receive an error
29+
but these changes can be seen and parsed by procedural macros and
30+
conditional compilation.
31+
32+
Compiler
33+
--------
34+
- [Added tier 2\* support for `armv7a-none-eabi`.][68253]
35+
- [Added tier 2 support for `riscv64gc-unknown-linux-gnu`.][68339]
36+
- [`Option::{expect,unwrap}` and
37+
`Result::{expect, expect_err, unwrap, unwrap_err}` now produce panic messages
38+
pointing to the location where they were called, rather than
39+
`core`'s internals. ][67887]
40+
41+
\* Refer to Rust's [platform support page][forge-platform-support] for more
42+
information on Rust's tiered platform support.
43+
44+
Libraries
45+
---------
46+
- [`iter::Empty<T>` now implements `Send` and `Sync` for any `T`.][68348]
47+
- [`Pin::{map_unchecked, map_unchecked_mut}` no longer require the return type
48+
to implement `Sized`.][67935]
49+
- [`io::Cursor` now derives `PartialEq` and `Eq`.][67233]
50+
- [`Layout::new` is now `const`.][66254]
51+
- [Added Standard Library support for `riscv64gc-unknown-linux-gnu`.][66899]
52+
53+
54+
Stabilized APIs
55+
---------------
56+
- [`CondVar::wait_while`]
57+
- [`CondVar::wait_timeout_while`]
58+
- [`DebugMap::key`]
59+
- [`DebugMap::value`]
60+
- [`ManuallyDrop::take`]
61+
- [`matches!`]
62+
- [`ptr::slice_from_raw_parts_mut`]
63+
- [`ptr::slice_from_raw_parts`]
64+
65+
Cargo
66+
-----
67+
- [You no longer need to include `extern crate proc_macro;` to be able to
68+
`use proc_macro;` in the `2018` edition.][cargo/7700]
69+
70+
Compatibility Notes
71+
-------------------
72+
- [`Error::description` has been deprecated, and its use will now produce a
73+
warning.][66919] It's recommended to use `Display`/`to_string` instead.
74+
75+
[68253]: https://github.com/rust-lang/rust/pull/68253/
76+
[68348]: https://github.com/rust-lang/rust/pull/68348/
77+
[67935]: https://github.com/rust-lang/rust/pull/67935/
78+
[68339]: https://github.com/rust-lang/rust/pull/68339/
79+
[68122]: https://github.com/rust-lang/rust/pull/68122/
80+
[67712]: https://github.com/rust-lang/rust/pull/67712/
81+
[67887]: https://github.com/rust-lang/rust/pull/67887/
82+
[67131]: https://github.com/rust-lang/rust/pull/67131/
83+
[67233]: https://github.com/rust-lang/rust/pull/67233/
84+
[66899]: https://github.com/rust-lang/rust/pull/66899/
85+
[66919]: https://github.com/rust-lang/rust/pull/66919/
86+
[66254]: https://github.com/rust-lang/rust/pull/66254/
87+
[cargo/7700]: https://github.com/rust-lang/cargo/pull/7700
88+
[`DebugMap::key`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.key
89+
[`DebugMap::value`]: https://doc.rust-lang.org/stable/std/fmt/struct.DebugMap.html#method.value
90+
[`ManuallyDrop::take`]: https://doc.rust-lang.org/stable/std/mem/struct.ManuallyDrop.html#method.take
91+
[`matches!`]: https://doc.rust-lang.org/stable/std/macro.matches.html
92+
[`ptr::slice_from_raw_parts_mut`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts_mut.html
93+
[`ptr::slice_from_raw_parts`]: https://doc.rust-lang.org/stable/std/ptr/fn.slice_from_raw_parts.html
94+
[`CondVar::wait_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_while
95+
[`CondVar::wait_timeout_while`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.wait_timeout_while
96+
97+
198
Version 1.41.1 (2020-02-27)
299
===========================
3100

@@ -8,6 +105,7 @@ Version 1.41.1 (2020-02-27)
8105
[69225]: https://github.com/rust-lang/rust/issues/69225
9106
[69145]: https://github.com/rust-lang/rust/pull/69145
10107

108+
11109
Version 1.41.0 (2020-01-30)
12110
===========================
13111

0 commit comments

Comments
 (0)