Skip to content

Commit 6ec465d

Browse files
1.27.1 announcement
1 parent a02084c commit 6ec465d

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

_posts/2018-07-10-Rust-1.27.1.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# 1.27.1 release blog
2+
3+
The Rust team is happy to announce a new version of Rust, 1.27.1. Rust is a
4+
systems programming language focused on safety, speed, and concurrency.
5+
6+
If you have a previous version of Rust installed via rustup, getting Rust
7+
1.27.1 is as easy as:
8+
9+
```
10+
$ rustup update stable
11+
```
12+
13+
If you don't have it already, you can [get `rustup`][install] from the
14+
appropriate page on our website, and check out the [detailed release notes for
15+
1.27.1][notes] on GitHub.
16+
17+
[install]: https://www.rust-lang.org/install.html
18+
[notes]: https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1271-2018-07-10
19+
20+
## What's in 1.27.1 stable
21+
22+
This patch release fixes a bug in the borrow checker verification of `match` expressions.
23+
This bug was introduced in 1.26.0 with the stabilization of [match ergonomics]. We are
24+
uncertain that this specific problem actually indicated unsoundness in the borrow checker,
25+
but suspected that it might be a possibility, so decided to issue at point release. The
26+
code sample below caused a panic inside the compiler prior to this patch.
27+
28+
```rust
29+
fn main() {
30+
let a = vec!["".to_string()];
31+
a.iter().enumerate()
32+
.take_while(|(_, &t)| false)
33+
.collect::<Vec<_>>();
34+
}
35+
```
36+
37+
1.27.1 will reject the above code with this error message:
38+
39+
```
40+
error[E0507]: cannot move out of borrowed content
41+
--> src/main.rs:4:30
42+
|
43+
4 | .take_while(|(_, &t)| false)
44+
| ^-
45+
| ||
46+
| |hint: to prevent move, use `ref t` or `ref mut t`
47+
| cannot move out of borrowed content
48+
49+
error: aborting due to previous error
50+
```
51+
52+
Alongside the match ergonomics fix, a [security vulnerability] was also found in rustdoc,
53+
the standard documentation generator for Rust projects. That vulnerability is addressed by
54+
the second patch contained in this release, by removing the default search path for
55+
rustdoc plugins. This functionality will be entirely removed in Rust 1.28.0. This plugin
56+
infrastructure predates Rust 1.0 and has never been usable on stable, and has been
57+
unusable on nightly for many months. Expect to hear more about the removal in the next
58+
release: the current patch removes the default search path (instead, users must specify it
59+
explicitly), while the next release will remove the functionality entirely.
60+
61+
[security vulnerability]: https://blog.rust-lang.org/2018/07/06/security-advisory-for-rustdoc.html
62+
[match ergonomics]: https://blog.rust-lang.org/2018/05/10/Rust-1.26.html#nicer-match-bindings

0 commit comments

Comments
 (0)