-
Notifications
You must be signed in to change notification settings - Fork 303
Blog post for 1.43.0 #566
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Blog post for 1.43.0 #566
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
2f1ae61
Release notes for 1.43.0
steveklabnik 030f7dc
Update posts/2020-04-23-Rust-1.43.0.md
steveklabnik ea74cb9
Update posts/2020-04-23-Rust-1.43.0.md
steveklabnik 8bde1a2
Update posts/2020-04-23-Rust-1.43.0.md
steveklabnik 1220335
Address some more review comments
steveklabnik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
--- | ||
layout: post | ||
title: "Announcing Rust 1.41.0" | ||
author: The Rust Release Team | ||
release: true | ||
--- | ||
|
||
The Rust team is happy to announce a new version of Rust, 1.43.0. Rust is a | ||
programming language that is empowering everyone to build reliable and | ||
efficient software. | ||
|
||
If you have a previous version of Rust installed via rustup, getting Rust | ||
1.43.0 is as easy as: | ||
|
||
```console | ||
rustup update stable | ||
``` | ||
|
||
If you don't have it already, you can [get `rustup`][install] from the | ||
appropriate page on our website, and check out the [detailed release notes for | ||
1.43.0][notes] on GitHub. | ||
|
||
[install]: https://www.rust-lang.org/install.html | ||
[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1430-2020-04-23 | ||
|
||
## What's in 1.43.0 stable | ||
|
||
This release is fairly minor. There are no new major features. We have some | ||
new stabilized APIs, some compiler performance improvements, and a small | ||
macro-related feature. See the [detailed release notes][notes] to learn about | ||
other changes not covered by this post. | ||
|
||
### `item` fragments | ||
|
||
You can use `item` fragments to interpolate items into the body of traits, | ||
steveklabnik marked this conversation as resolved.
Show resolved
Hide resolved
|
||
impls, and extern blocks. For example: | ||
|
||
```rust | ||
macro_rules! mac_trait { | ||
($i:item) => { | ||
trait T { $i } | ||
} | ||
} | ||
mac_trait! { | ||
fn foo() {} | ||
steveklabnik marked this conversation as resolved.
Show resolved
Hide resolved
|
||
} | ||
``` | ||
|
||
### Type inference around primitives | ||
|
||
The type inference around primitives, references, and binary operations was | ||
improved. A code sample makes this easier to understand: this code fails to | ||
compile on Rust 1.42, but compiles in Rust 1.43. | ||
|
||
```rust | ||
let n: f32 = 0.0 + &0.0; | ||
``` | ||
|
||
In Rust 1.42, you would get an error that would say "hey, I don't know how to add | ||
an `f64` and an `&f64` with a result of `f32`." The algorithm now correctly decides | ||
that both `0.0` and `&0.0`s should be `f32`s instead. | ||
steveklabnik marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Library changes | ||
|
||
[You can now use associated constants on floats and integers directly][consts], rather | ||
than having to import the module. That is, you can now write `u32::MAX` or `f32::NAN` | ||
with no `use std::u32;` or `use std::f32;`. | ||
|
||
[consts]: https://github.com/rust-lang/rust/pull/68952/ | ||
|
||
There is a [new `primitive` | ||
module](https://github.com/rust-lang/rust/pull/67637/) that re-exports Rust's | ||
primitive types. This can be useful when you're writing a macro and want to make | ||
sure that the types aren't shadowed. | ||
|
||
Additionally, we stabilized six new APIs: | ||
|
||
- [`Once::is_completed`] | ||
- [`f32::LOG10_2`] | ||
- [`f32::LOG2_10`] | ||
- [`f64::LOG10_2`] | ||
- [`f64::LOG2_10`] | ||
- [`iter::once_with`] | ||
|
||
[`Once::is_completed`]: https://doc.rust-lang.org/std/sync/struct.Once.html#method.is_completed | ||
[`f32::LOG10_2`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG10_2.html | ||
[`f32::LOG2_10`]: https://doc.rust-lang.org/std/f32/consts/constant.LOG2_10.html | ||
[`f64::LOG10_2`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG10_2.html | ||
[`f64::LOG2_10`]: https://doc.rust-lang.org/std/f64/consts/constant.LOG2_10.html | ||
[`iter::once_with`]: https://doc.rust-lang.org/std/iter/fn.once_with.html | ||
|
||
### Other changes | ||
|
||
[relnotes-cargo]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-143-2020-04-23 | ||
[relnotes-clippy]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-143 | ||
|
||
There are other changes in the Rust 1.43.0 release: check out what changed in | ||
[Rust][notes], [Cargo][relnotes-cargo], and [Clippy][relnotes-clippy]. | ||
|
||
## Contributors to 1.43.0 | ||
|
||
Many people came together to create Rust 1.43.0. We couldn't have done it | ||
without all of you. [Thanks!](https://thanks.rust-lang.org/rust/1.43.0/) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.