Skip to content

Commit 107ac2e

Browse files
1.27.2 announcement
1 parent 60f3450 commit 107ac2e

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

_posts/2018-07-20-Rust-1.27.2.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
layout: post
3+
title: "Announcing Rust 1.27.2"
4+
author: The Rust Core Team
5+
---
6+
7+
The Rust team is happy to announce a new version of Rust, 1.27.2. Rust is a
8+
systems programming language focused on safety, speed, and concurrency.
9+
10+
If you have a previous version of Rust installed via rustup, getting Rust
11+
1.27.2 is as easy as:
12+
13+
```bash
14+
$ rustup update stable
15+
```
16+
17+
If you don't have it already, you can [get `rustup`][install] from the
18+
appropriate page on our website, and check out the [detailed release notes for
19+
1.27.2][notes] on GitHub.
20+
21+
[install]: https://www.rust-lang.org/install.html
22+
[notes]: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1272-2018-07-20
23+
24+
## What's in 1.27.2 stable
25+
26+
This patch release fixes a bug in the borrow checker verification of `match` expressions. This bug
27+
was introduced in 1.26.0 with the stabilization of [match ergonomics]. Specifically, it permitted
28+
code which took two mutable borrows of the `bar` path at the same time.
29+
30+
```rust
31+
fn transmute_lifetime<'a, 'b, T>(t: &'a (T,)) -> &'b T {
32+
match (&t, ()) {
33+
((t,), ()) => t,
34+
}
35+
}
36+
37+
fn main() {
38+
let x = {
39+
let y = Box::new((42,));
40+
transmute_lifetime(&y)
41+
};
42+
43+
println!("{}", x);
44+
}
45+
```
46+
47+
1.27.2 will reject the above code.
48+
49+
[match ergonomics]: https://blog.rust-lang.org/2018/05/10/Rust-1.26.html#nicer-match-bindings

0 commit comments

Comments
 (0)