Skip to content

Commit bab69f1

Browse files
committed
review feedback
1 parent 076f45c commit bab69f1

File tree

1 file changed

+28
-17
lines changed

1 file changed

+28
-17
lines changed

_posts/2017-02-02-Rust-1.15.md

Lines changed: 28 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,24 @@ author: The Rust Core Team
77
The Rust team is happy to announce the latest version of Rust, 1.15.0. Rust is a
88
systems programming language focused on safety, speed, and concurrency.
99

10-
As always, you can [install Rust 1.15.0][install] from the appropriate page on our
11-
website, and check out the [detailed release notes for 1.15.0][notes] on GitHub.
12-
1443 patches were landed in this release.
10+
If you have a previous version of Rust installed, getting Rust 1.15 is as easy as:
11+
12+
```bash
13+
$ rustup update stable
14+
```
15+
16+
If you don't have it already, you can [get `rustup`][install] from the
17+
appropriate page on our website, and check out the [detailed release notes for
18+
1.15.0][notes] on GitHub. 1443 patches were landed in this release.
1319

1420
[install]: https://www.rust-lang.org/install.html
1521
[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1150-2017-02-02
1622

1723
### What's in 1.15.0 stable
1824

1925
Rust 1.15 sees an _extremely_ long-awaited feature land on stable: custom
20-
derive! To review, in Rust, you could automatically implement a trait through
21-
the `derive` attribute:
26+
derive! To review, in Rust, you've always been able to automatically implement
27+
a trait through the `derive` attribute:
2228

2329
```rust
2430
#[derive(Debug)]
@@ -27,16 +33,16 @@ struct Pet {
2733
}
2834
```
2935

30-
The `Debug` trait would be implemented for `Pet`. However, this only worked for
36+
The `Debug` trait is then implemented for `Pet`. However, this only worked for
3137
traits provided as part of the standard library; it was not customizable. With
3238
Rust 1.15, it now is. That means, if you want to turn your `Pet` into JSON, it's
3339
as easy as adding [serde] to your `Cargo.toml`:
3440

3541
```toml
3642
[dependencies]
37-
serde = "0.9.5"
38-
serde_derive = "0.9.5"
39-
serde_json = "0.9.3"
43+
serde = "0.9.0"
44+
serde_derive = "0.9.0"
45+
serde_json = "0.9.0"
4046
```
4147

4248
[serde]: https://serde.rs
@@ -79,7 +85,7 @@ our `Pet`s in a database. We could do that like this:
7985
// some extern crate and use lines elided here
8086

8187
#[derive(Queryable)]
82-
strut Pet {
88+
struct Pet {
8389
name: String,
8490
}
8591

@@ -121,6 +127,8 @@ derive was also known as "macros 1.1", as it includes the infrastructure for
121127
supporting even more compile-time powers of Rust, nicknamed "macros 2.0."
122128
Expect to hear more about this space in future releases.
123129

130+
#### Other improvements
131+
124132
As a smaller improvement, [`?Sized` can now be used in `where`
125133
clauses](https://github.com/rust-lang/rust/pull/37791). In other words:
126134

@@ -148,13 +156,13 @@ demonstration of the maturity of Cargo.
148156
[rustbuild]: https://github.com/rust-lang/rust/pull/37817
149157
[rustbuild-only]: https://github.com/rust-lang/rust/pull/39431
150158

151-
Rust has gained [Tier 3 support][tiers] for `i686-unknown-openbsd`, `MSP430`,
152-
and `ARMv5TEr`.
159+
Rust has gained [Tier 3 support][tiers] for [`i686-unknown-openbsd`], [`MSP430`],
160+
and [`ARMv5TE`].
153161

154162
[tiers]: https://forge.rust-lang.org/platform-support.html
155163
[`i686-unknown-openbsd`]: https://github.com/rust-lang/rust/pull/38086
156164
[`MSP430`]: https://github.com/rust-lang/rust/pull/37627
157-
[`ARMv5TEr`]: https://github.com/rust-lang/rust/pull/37615
165+
[`ARMv5TE`]: https://github.com/rust-lang/rust/pull/37615
158166

159167
Finally, [a number of compiler performance improvements have
160168
landed](https://github.com/rust-lang/rust/blob/master/RELEASES.md#compiler-performance).
@@ -219,10 +227,13 @@ See the [detailed release notes][notes] for more.
219227

220228
#### Cargo features
221229

222-
Cargo has received an ergonomics improvement: If you have a file named
223-
`build.rs` in the root directory, it will [now assume that it's a build script
224-
][cargo/3361]. Previously, all build scripts required configuration, but this
225-
convention was strong within the community, so we've encoded it into Cargo.
230+
Cargo will now [emit a warning][cargo/3361] if you have a file named `build.rs`
231+
at the top level of a package, but don't have a `build = "build.rs"`
232+
annotation. This is in anticipation of inferring that `build.rs` at the top
233+
level is always a build script, but is a warning right now for compatibility
234+
reasons. Previously, all build scripts required configuration, but this
235+
convention was strong within the community, so we're going to encode it into
236+
Cargo.
226237

227238
[cargo/3361]: https://github.com/rust-lang/cargo/pull/3361
228239

0 commit comments

Comments
 (0)