-
Notifications
You must be signed in to change notification settings - Fork 288
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
1.18.0 announcement #173
1.18.0 announcement #173
Conversation
_posts/2017-06-08-Rust-1.18.md
Outdated
As part of the transition plan, [a new flag has been added to | ||
`rustdoc`](https://github.com/rust-lang/rust/pull/40338), `--enable-commonmark`. | ||
This will use the new parser instead of the old one. Please give it a try! There's | ||
no scenario we know of where tweaking your markdown gets identical results on both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like this is missing a negation I think? Presumably it's possible to write some text that renders the same with CommonMark and Hoedown.
_posts/2017-06-08-Rust-1.18.md
Outdated
|
||
- [`Child::try_wait`] is a non-blocking form of `Child::wait`. | ||
- [`HashMap::retain`] and [`HashSet::retain`] bring the `retain` API `Vec<T>` has to these two hash data structures. | ||
- [`PeekMut::pop`] lets you pop stuff off of a `BinaryHeap<T>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could pop stuff off of BinaryHeap
already - this lets you pop the top element off of the heap after you've already looked at/messed with it without needing to reorder the heap twice.
_posts/2017-06-08-Rust-1.18.md
Outdated
> ./foo | ||
4 | ||
> rustc foo.rs -Z fuel=foo=0 | ||
optimization-fuel-exhausted: Reorder fields of "Suboptimal" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will this work on stable? It seems like we don't really want to publicize -Z
options... though there's probably no alternative right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think -Z will work on stable 1.18, but stop working on stable 1.19, when this PR gets into stable.
_posts/2017-06-08-Rust-1.18.md
Outdated
You can also specify a path, like this: | ||
|
||
```rust | ||
pub(a::b::c) foo; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The syntax is pub(in a::b::c)
. That was a last minute change before stabilization. pub(crate)
is fine.
_posts/2017-06-08-Rust-1.18.md
Outdated
|
||
### What's in 1.18.0 stable | ||
|
||
Rust 1.18.0 is similar to many of our releases: no big bombshells, just a number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, and this is totally a personal pet peeve of mine that you can feel free to ignore, can we not use war-related phrases? suggestion: "no big surprises"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just drop this altogether. On the train system, this is the default! Incremental improvement over time. Making a note of it like this feels unnecessarily defensive.
_posts/2017-06-08-Rust-1.18.md
Outdated
of improvements, cleanups, and new features. | ||
|
||
One of the largest changes is a long time coming: core team members Carol | ||
Nichols and Steve Klabnik have been writing a new edition of "The Rust |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
❤️
_posts/2017-06-08-Rust-1.18.md
Outdated
contributors in total. This release [includes the first draft of the second | ||
edition in our online documentation](https://doc.rust-lang.org/stable/book/). | ||
19 out of 20 chapters have a draft; the draft of chapter 20 will land in the | ||
Rust 1.19. When the book is done, a print version will be made available through |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/in the Rust 1.19./in Rust 1.19./ or /in the Rust 1.19 release./
_posts/2017-06-08-Rust-1.18.md
Outdated
[No Starch Press](https://www.nostarch.com/Rust), if you'd like a paper copy. | ||
While first drafts of the chapters are available, we're still working with the | ||
editors at No Starch to improve the text, so there's more to do, but we wanted | ||
to start getting a wider audience now. The new edition is a complete re-write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "While first drafts" sentence feels kinda long, maybe split it in two? Or shorten to just "We're still working with the editors at No Starch to improve the text, but we wanted to start getting a wider audience now"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The new edition" -> I'd start a new paragraph with that sentence.
_posts/2017-06-08-Rust-1.18.md
Outdated
from the ground up, using the last two years of knowledge we've gained from | ||
teaching people Rust. You'll find brand-new explanations for a lot of Rust's | ||
core concepts, new projects to build, and all kinds of other good stuff. Please | ||
check it out and let us know what you think! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we include a link to the rust-lang/book repo again here? Or the new issue form in that repo?
_posts/2017-06-08-Rust-1.18.md
Outdated
We've been planning this for a while; previous versions of Rust included this | ||
optimization on the nightly channel, but some people wrote unsafe code that | ||
assumed the exact details of the representation. We rolled it back while we fixed | ||
all instances of this that we know about, but if you find some code breaks due to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What kind of code would break because of this? What does breaking look like? How do I fix it? This is a little scary to me without it, even though I probably don't have this problem ;)
Is there someplace we can link that would go into more details on the potential breakage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just changed this to "let us know so we can help you fix it" esp since aturon recommended removing all the fuel stuff
_posts/2017-06-08-Rust-1.18.md
Outdated
> rustc foo.rs | ||
> ./foo | ||
4 | ||
> rustc foo.rs -Z fuel=foo=0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this an unstable flag that isn't supposed to be used on stable? (I might be confused about this)
Is foo
here the module path?
Are there docs/PR/RFC/issue on this flag we can link to here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
now moot
_posts/2017-06-08-Rust-1.18.md
Outdated
As part of the transition plan, [a new flag has been added to | ||
`rustdoc`](https://github.com/rust-lang/rust/pull/40338), `--enable-commonmark`. | ||
This will use the new parser instead of the old one. Please give it a try! There's | ||
no scenario we know of where tweaking your markdown gets identical results on both |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
. . . . is this sentence supposed to say "There's no scenario we know of where tweaking your markdown doesn't get identical results on both parsers...?" If not, I'm confused about why we're stating this in this way? Does "tweaking your markdown" mean I change the markdown text I've written, or does it mean "tweaking your markdown parser"?
#### Cargo features | ||
|
||
Cargo has [added support](https://github.com/rust-lang/cargo/pull/3842) for the Pijul VCS, | ||
which is written in Rust. `cargo new my-awesome-project --vcs=pijul` will get you going! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ooooooh coool!!!!!
_posts/2017-06-08-Rust-1.18.md
Outdated
Cargo has [added support](https://github.com/rust-lang/cargo/pull/3842) for the Pijul VCS, | ||
which is written in Rust. `cargo new my-awesome-project --vcs=pijul` will get you going! | ||
|
||
To suppliment the `--all` flag, Cargo now has [several new |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/suppliment/supplement/ ❤️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left a bunch of nits. This is a great release!
_posts/2017-06-08-Rust-1.18.md
Outdated
|
||
### What's in 1.18.0 stable | ||
|
||
Rust 1.18.0 is similar to many of our releases: no big bombshells, just a number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would just drop this altogether. On the train system, this is the default! Incremental improvement over time. Making a note of it like this feels unnecessarily defensive.
_posts/2017-06-08-Rust-1.18.md
Outdated
[No Starch Press](https://www.nostarch.com/Rust), if you'd like a paper copy. | ||
While first drafts of the chapters are available, we're still working with the | ||
editors at No Starch to improve the text, so there's more to do, but we wanted | ||
to start getting a wider audience now. The new edition is a complete re-write |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"The new edition" -> I'd start a new paragraph with that sentence.
_posts/2017-06-08-Rust-1.18.md
Outdated
is made public. Using the `crate` keyword like the example above means that | ||
`bar` would be public to the entire crate, but not outside of it. This makes it | ||
easier to declare APIs that are "public to your crate", but not exposed to your | ||
users. This was *possible* with the current module system, but often very awkward. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/current/existing/
_posts/2017-06-08-Rust-1.18.md
Outdated
This struct is properly aligned; the `u16` lies on a two byte boundary, and so does | ||
the entire struct. No padding is needed. This gives us `1 + 1 + 2 = 4 bytes`. | ||
|
||
When designing Rust, stuff like this is why we left the details here undefined. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Little too much "stuff" "here" "thing" :-)
_posts/2017-06-08-Rust-1.18.md
Outdated
into `Optimal` automatically. And if you check the sizes of `Suboptimal` and | ||
`Optimal` on Rust 1.18.0, you'll see that they both have a size of four bytes. | ||
|
||
We've been planning this for a while; previous versions of Rust included this |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/this/this change/
_posts/2017-06-08-Rust-1.18.md
Outdated
> consumed. When the optimizer runs out of fuel, further rewrites are | ||
> suppressed. | ||
|
||
Currently, this is the only optimization that uses the "fuel" concept. By |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should nix the stuff about the fuel flag.
_posts/2017-06-08-Rust-1.18.md
Outdated
parsers. | ||
|
||
Finally, compiling `rustc` itself is now [15%-20% faster](https://github.com/rust-lang/rust/pull/41469). Each commit message in this PR | ||
goes over the details, but the short of it is that there were some inefficient |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The "but the short of it" doesn't add anything and should be dropped.
r? @rust-lang/core