@@ -7,18 +7,24 @@ author: The Rust Core Team
7
7
The Rust team is happy to announce the latest version of Rust, 1.15.0. Rust is a
8
8
systems programming language focused on safety, speed, and concurrency.
9
9
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.
13
19
14
20
[ install ] : https://www.rust-lang.org/install.html
15
21
[ notes ] : https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1150-2017-02-02
16
22
17
23
### What's in 1.15.0 stable
18
24
19
25
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:
22
28
23
29
``` rust
24
30
#[derive(Debug )]
@@ -27,16 +33,16 @@ struct Pet {
27
33
}
28
34
```
29
35
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
31
37
traits provided as part of the standard library; it was not customizable. With
32
38
Rust 1.15, it now is. That means, if you want to turn your ` Pet ` into JSON, it's
33
39
as easy as adding [ serde] to your ` Cargo.toml ` :
34
40
35
41
``` toml
36
42
[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 "
40
46
```
41
47
42
48
[ serde ] : https://serde.rs
@@ -79,7 +85,7 @@ our `Pet`s in a database. We could do that like this:
79
85
// some extern crate and use lines elided here
80
86
81
87
#[derive(Queryable )]
82
- strut Pet {
88
+ struct Pet {
83
89
name : String ,
84
90
}
85
91
@@ -121,6 +127,8 @@ derive was also known as "macros 1.1", as it includes the infrastructure for
121
127
supporting even more compile-time powers of Rust, nicknamed "macros 2.0."
122
128
Expect to hear more about this space in future releases.
123
129
130
+ #### Other improvements
131
+
124
132
As a smaller improvement, [ ` ?Sized ` can now be used in ` where `
125
133
clauses] ( https://github.com/rust-lang/rust/pull/37791 ) . In other words:
126
134
@@ -148,13 +156,13 @@ demonstration of the maturity of Cargo.
148
156
[ rustbuild ] : https://github.com/rust-lang/rust/pull/37817
149
157
[ rustbuild-only ] : https://github.com/rust-lang/rust/pull/39431
150
158
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 ` ] .
153
161
154
162
[ tiers ] : https://forge.rust-lang.org/platform-support.html
155
163
[ `i686-unknown-openbsd` ] : https://github.com/rust-lang/rust/pull/38086
156
164
[ `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
158
166
159
167
Finally, [ a number of compiler performance improvements have
160
168
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.
219
227
220
228
#### Cargo features
221
229
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.
226
237
227
238
[ cargo/3361 ] : https://github.com/rust-lang/cargo/pull/3361
228
239
0 commit comments