Skip to content

1.25 announcement #237

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 4 commits into from
Mar 29, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 115 additions & 0 deletions _posts/2018-03-29-Rust-1.25.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
---
layout: post
title: "Announcing Rust 1.25"
author: The Rust Core Team
---

The Rust team is happy to announce a new version of Rust, 1.25.0. Rust is a
systems programming language focused on safety, speed, and concurrency.

If you have a previous version of Rust installed via rustup, getting Rust
1.25.0 is as easy as:

```bash
$ 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.25.0][notes] on GitHub.

[install]: https://www.rust-lang.org/install.html
[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1250-2018-03-29

## What's in 1.25.0 stable

Rust 1.25 contains a bunch of stuff! The first one is straightforward: we've
[upgraded to LLVM 6] from LLVM 4. This has a number of effects, a major one
being a step closer to AVR support.

A new way to write `use` statements has landed: [nested import groups]. If you've
ever written a set of imports like this:

```rust
use std::fs::File;
use std::io::Read;
use std::path::{Path, PathBuf};
```

You can now write this:

```rust
// on one line
use std::{fs::File, io::Read, path::{Path, PathBuf}};

// with some more breathing room
use std::{
fs::File,
io::Read,
path::{
Path,
PathBuf
}
};
```

This can reduce some repetition, and make things a bit more clear.

There are two big documentation changes in this release: first, [Rust By
Example is now included on doc.rust-lang.org]! We'll be redirecing the old
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/redirecing/redirecting

domain there shortly. We hope this will bring more attention to a great
resource, and you'll get a local copy with your local documentation.

Second, back in Rust 1.23, we talked about the change from Hoedown to
pulldown-cmark. In Rust 1.25, pulldown-cmark is now the default rendering.
After years, we have finally removed the last bit of C from rustdoc, and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might be correct, but "After years" sounds a little odd -- maybe remove entirely? I can't think of what would go well there...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, if you think it is. idk.

properly follow the CommonMark spec.

Finally, in [RFC 1358], `#[repr(align(x))]` was accepted. In Rust
1.25, [it is now stable]! This attribute lets you set the [alignment]
of your `struct`s:

```rust
struct NotAligned(i32);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Er, this is by-default aligned I think? It's just aligned in a somewhat unspecified (not sure on this. might be specified) way.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah good point, it's not specifically aligned, or like, compiler chooses how to align it. hrm.


assert_eq!(std::mem::align_of::<NotAligned>(), 4);
assert_eq!(std::mem::size_of::<NotAligned>(), 4);

#[repr(align(16))]
struct Align16(i32);

assert_eq!(std::mem::align_of::<Align16>(), 16);
assert_eq!(std::mem::size_of::<Align16>(), 16);
```

If you're working with low-level stuff, control of these kinds of things
can be very important!

[upgraded to LLVM 6]: https://github.com/rust-lang/rust/pull/47828
[nested import groups]: https://github.com/rust-lang/rust/pull/47948
[Rust By Example is now included on doc.rust-lang.org]: https://doc.rust-lang.org/rust-by-example/
[RFC 1358]: https://github.com/rust-lang/rfcs/blob/master/text/1358-repr-align.md
[it is now stable]: https://github.com/rust-lang/rust/pull/47006
[alignment]: https://en.wikipedia.org/wiki/Data_structure_alignment


See the [detailed release notes][notes] for more.

### Library stabilizations


Additionally, a few new APIs were stabilized this release:

* [] ()

See the [detailed release notes][notes] for more.

### Cargo features


See the [detailed release notes][notes] for more.

## Contributors to 1.25.0

Many people came together to create Rust 1.25. We couldn't have done it
without all of you. [Thanks!](https://thanks.rust-lang.org/rust/1.25.0)