Skip to content

Commit 08f0965

Browse files
1.45.1 post (#660)
Co-authored-by: Kyle J Strand <[email protected]>
2 parents 1dea0f2 + 26b5bef commit 08f0965

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

posts/2020-07-30-Rust-1.45.1.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
---
2+
layout: post
3+
title: "Announcing Rust 1.45.1"
4+
author: The Rust Release Team
5+
release: true
6+
---
7+
8+
The Rust team is happy to announce a new version of Rust, 1.45.1. Rust is a
9+
programming language that is empowering everyone to build reliable and
10+
efficient software.
11+
12+
If you have a previous version of Rust installed via rustup, getting Rust
13+
1.45.1 is as easy as:
14+
15+
```console
16+
rustup update stable
17+
```
18+
19+
If you don't have it already, you can [get `rustup`][install] from the
20+
appropriate page on our website, and check out the [detailed release notes for
21+
1.45.1][notes] on GitHub.
22+
23+
[install]: https://www.rust-lang.org/install.html
24+
[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1451-2020-07-30
25+
26+
## What's in 1.45.1 stable
27+
28+
1.45.1 contains a collection of fixes, including one soundness fix. All patches
29+
in 1.45.1 address bugs that affect only the 1.45.0 release; prior releases are
30+
not affected by the bugs fixed in this release.
31+
32+
### Fix const propagation with references
33+
34+
In Rust 1.45.0, `rustc`'s const propagation pass did not properly handle
35+
encountering references when determining whether to propagate a given constant,
36+
which could lead to incorrect behavior. Our releases are run through [crater],
37+
and we did not detect it, which helps us be fairly confident that this affects a
38+
very small set of code in the wild (if any).
39+
40+
The conditions necessary to cause this bug are highly unlikely to occur in
41+
practice: the code must have inputs consisting of entirely constant values and
42+
no control flow or function calls in between.
43+
44+
```rust
45+
struct Foo {
46+
x: u32,
47+
}
48+
49+
fn main() {
50+
let mut foo = Foo { x: 42 };
51+
let x = &mut foo.x;
52+
*x = 13;
53+
let y = foo;
54+
println!("{}", y.x); // -> 42; expected result: 13
55+
}
56+
```
57+
58+
## Contributors to 1.45.1
59+
60+
Many people came together to create Rust 1.45.1. We couldn't have done it
61+
without all of you. [Thanks!](https://thanks.rust-lang.org/rust/1.45.1/)
62+
63+
[crater]: https://github.com/rust-lang/crater

0 commit comments

Comments
 (0)