Skip to content
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

Merged
merged 7 commits into from Jun 21, 2018
Merged

Rust 1.27 #257

merged 7 commits into from Jun 21, 2018

Conversation

steveklabnik
Copy link
Member

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!


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
Copy link
Member

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.

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).
Copy link
Member

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.


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
Copy link
Member

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!
Copy link
Member

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

Copy link
Member

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. :-)

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
Copy link
Contributor

Choose a reason for hiding this comment

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

elemnt => element

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:
Copy link
Contributor

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.
Copy link
Member

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?

Copy link
Member Author

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
Copy link
Member

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"

Copy link
Member Author

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).

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.

Copy link
Member

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

@@ -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
Copy link
Contributor

Choose a reason for hiding this comment

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

deafault => default

@@ -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
Copy link
Member

Choose a reason for hiding this comment

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

default

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.
Copy link
Member

Choose a reason for hiding this comment

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

*unsoundness

@steveklabnik steveklabnik merged commit 13d43cb into gh-pages Jun 21, 2018
@Mark-Simulacrum Mark-Simulacrum deleted the 1.27-announcement branch June 21, 2018 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants