-
Notifications
You must be signed in to change notification settings - Fork 292
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
Rust 1.27 #257
Rust 1.27 #257
Conversation
_posts/2018-06-21-Rust-1.27.md
Outdated
|
||
This release has two big language features that people have been waiting for. | ||
But first, a small comment on documentation: All books in [the Rust | ||
Bookshelf] are [now searchable]! For example, here's [a search on TRPL for |
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.
hm, should we make this "The Rust Programming Language"? Not all readers will be familiar with TRPL.
_posts/2018-06-21-Rust-1.27.md
Outdated
This release has two big language features that people have been waiting for. | ||
But first, a small comment on documentation: All books in [the Rust | ||
Bookshelf] are [now searchable]! For example, here's [a search on TRPL for | ||
'borrow'](https://doc.rust-lang.org/beta/book/second-edition/?search=borrow). |
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.
This URL points to beta but should probably point at stable.
_posts/2018-06-21-Rust-1.27.md
Outdated
|
||
Here, we're taking two slices, and adding the numbers together, placing the | ||
result in a third slice. The simplest possible way to do this would be to do | ||
exactly what the code says, and loop through each set of elements, add them |
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/what the code says/what the code does/ perhaps?
Beyond *that*, you may never write any of this yourself, but as always, the | ||
libraries you depend on may. For example, the [regex crate has already added | ||
support](https://github.com/rust-lang/regex/pull/456), and a new release | ||
will contain these SIMD speedups without you needing to do anything at all! |
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.
Ah thanks for the reminder on this! It is almost true. I just put up a PR to make this happen: rust-lang/regex#490 (Today, you still need to pass the unstable
feature at compile time.)
Once that PR is green I'll merge it and get out a new release, so this should be good to go by Thursday.
Also, thanks for mentioning this. :-) <3
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.
OK, regex 1.0.1
is out and this text is now correct. :-)
_posts/2018-06-21-Rust-1.27.md
Outdated
exactly what the code says, and loop through each set of elements, add them | ||
together, and store it in the result. However, compilers can often do better. | ||
LLVM will often "autovectorize" code like this, which is a fancy term for | ||
"use SIMD." Imagine that `a` and `b` were both 16 elements long. Each elemnt |
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.
elemnt => element
_posts/2018-06-21-Rust-1.27.md
Outdated
module] allows us to use these kinds of instructions *directly*, which | ||
means we don't need to rely on a smart compiler. Additionally, it includes | ||
some features that allow us to choose a particular implementation based | ||
on various critera. For example: |
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.
critera => criteria
Due to backwards compatibility, we cannot remove the old syntax, but we have | ||
included a lint, which is set to allow by default, called [`bare-trait-object`]. | ||
If you want to lint against the older syntax, you can turn it on. We thought that | ||
it would throw far too many warnings to turn on by default at present. |
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.
Maybe worth mentioning that rustfix
is in the works?
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.
Tossing in a little sidebar about this 👍
|
||
Additionally, a tweak to the way Cargo deals with targets has landed. Cargo | ||
will attempt to automatically discover tests, examples, and binaries within | ||
your project. However, sometimes explicit configuration is needed. But the |
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 found this sequence a bit confusing, and in particular think it should probably be "the initial implementation had a problem"
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 added a had
. Not sure how to make it better than that. Anyone else?
But first, a small comment on documentation: All books in [the Rust | ||
Bookshelf] are [now searchable]! For example, here's [a search of "The Rust | ||
Programming Language" for | ||
'borrow'](https://doc.rust-lang.org/book/second-edition/?search=borrow). |
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.
This link doesn't seem to work for me. It just takes me to the forward of the second-edition.
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.
Most of the new links won't work until 1.27 is released. You can see the working link in the beta docs though: https://doc.rust-lang.org/beta/book/second-edition/?search=borrow
_posts/2018-06-21-Rust-1.27.md
Outdated
@@ -21,6 +21,16 @@ appropriate page on our website, and check out the [detailed release notes for | |||
[install]: https://www.rust-lang.org/install.html | |||
[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1270-2018-06-21 | |||
|
|||
Additionally, we would like to draw attention to something: just before the | |||
release of 1.27.0, we found [a | |||
bug](https://github.com/rust-lang/rust/pull/51686) in the 'deafault match |
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.
deafault => default
_posts/2018-06-21-Rust-1.27.md
Outdated
@@ -21,6 +21,16 @@ appropriate page on our website, and check out the [detailed release notes for | |||
[install]: https://www.rust-lang.org/install.html | |||
[notes]: https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1270-2018-06-21 | |||
|
|||
Additionally, we would like to draw attention to something: just before the | |||
release of 1.27.0, we found [a | |||
bug](https://github.com/rust-lang/rust/pull/51686) in the 'deafault match |
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.
default
_posts/2018-06-21-Rust-1.27.md
Outdated
Additionally, we would like to draw attention to something: just before the | ||
release of 1.27.0, we found [a | ||
bug](https://github.com/rust-lang/rust/pull/51686) in the 'deafault match | ||
bindings' feature introduced in 1.26.0 that can possibly introduce unsoundess. |
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.
*unsoundness
The first half of this is done, working on the second half. r? @rust-lang/core
additionally, cc @BurntSushi; I want to make sure that I'm right with regards to regex here, and if you'd like me to take it out, no hard feelings of course!