-
Notifications
You must be signed in to change notification settings - Fork 293
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.31 announcement #295
1.31 announcement #295
Conversation
_posts/2018-12-06.Rust-1.31.md
Outdated
|
||
### Cargo features | ||
|
||
Cargo will now download packages in parallel using HTTP/2. Additionally, |
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 state how much quicker this is, will follow up...
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.
"Up to 20x faster"
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.
Do we have these numbers? how reliable are they?
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 don't think we have the detail. But I think they are reliable (the number is from a GH issue, so it must be true).
_posts/2018-12-06.Rust-1.31.md
Outdated
July](https://blog.rust-lang.org/2018/07/27/what-is-rust-2018.html). | ||
For some more background about the *why* of Rust 2018, please go read those | ||
posts; there's a lot to cover in the release announcement, and so we're going | ||
to focus on the *what* 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.
TODO: link to Lin's post here, for a graphic explainer of what Rust 2018 is all about.
_posts/2018-12-06.Rust-1.31.md
Outdated
previously rejected. Consider this example: | ||
|
||
```rust | ||
fn main() { |
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 wonder if we should use, or at least mention, a more real example? Maybe we should just leave it for @nikomatsakis's post, though.
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.
A "mutate the original variable at the end of a match
" example might be good. IMO That's one of the biggest pain points. Perhaps this example from the RFC?
fn process_or_default() {
let mut map = ...;
let key = ...;
match map.get_mut(&key) { // -------------+ 'lifetime
Some(value) => process(value), // |
None => { // |
map.insert(key, V::default()); // |
// ^~~~~~ ERROR. // |
} // |
} // <------------------------------------+
}
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'd like to stick to the simple example for now, unless we feel really strongly about it. There's a lot in this post already, and keeping it straightforward is more important than being hyper realistic, I think.
If people feel super strongly I'm willing to change it though.
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.
@steveklabnik I don't feel super strongly about this. But I'd like to point out that we're likely to get a fair number of people from outside the normal Rust community reading this, who might not have the context for why such a change is important/useful/interesting.
If you're worried about length, perhaps we could link out to a blog post or to the RFC instead of including a more realistic example in the post?
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 did link to the edition guide, which has the full details of everything; maybe we need another one?
_posts/2018-12-06.Rust-1.31.md
Outdated
|
||
* `extern crate` is no longer needed in 99% of circumstances. | ||
* You can import macros with `use`, rather than a `#[macro_use]` attribute. | ||
* Absolute paths begin with a crate name, where the keyword `crate` refers to the current crate. |
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 clarify: all paths in use
statements
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 am not 100% sure what you're asking me to tweak.
_posts/2018-12-06.Rust-1.31.md
Outdated
* Absolute paths begin with a crate name, where the keyword `crate` refers to the current crate. | ||
* A `foo.rs` and `foo/` subdirectory may coexist; `mod.rs` is no longer needed when placing submodules in a subdirectory. | ||
|
||
These may seem like arbitrary new rules when put this way, but the mental |
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 feels a bit underwhemling. I'm wondering if we can get across a bit more about why this is an improvement. For example, we could talk about how this eliminates the confusion around paths working differently at the top level module vs submodules.
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 was worried about the post being too long.... doing that adds a lot of length. I agree that it feels underwhelming though...
_posts/2018-12-06.Rust-1.31.md
Outdated
|
||
`const fn`s cannot do everything that normal `fn`s can do; they must | ||
have deterministic output. This is important for soundness reasons. | ||
Currently, `const fn`s can do a minimal subset of operations. Here's |
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.
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.
Looks accurate / what we said in the tracking issue / reference;
Are you looking for something specific?
cc @oli-obk
This post should call out all of the efforts in Rust 2018 -- after all, the idea was to package all of this work up into a big product release, covering all aspects of the Rust experience. So, for example, we're missing:
I think it would also be valuable to repeat at least some of the core framing around what Rust 2018 is, and what this whole thing is supposed to mean to people. |
We'll have follow-up posts for many of these topics, but it seems important to at least mention all of the work that people have put into Rust 2018, and giving a high-level picture of how this all adds up. |
IMHO, this post feels very subdued compared to the amount of work that went into Rust 2018. I know there are other posts planned, but the release announcement is a natural place to celebrate all the hard work, to thank everyone that helped make it possible, to show screenshots of things like the new website, the new docs, to have a taste of what Rust 2018 will let you do in practice... Basically, be excited about it! It's big news! 🍰 |
_posts/2018-12-06.Rust-1.31.md
Outdated
|
||
`const fn`s cannot do everything that normal `fn`s can do; they must | ||
have deterministic output. This is important for soundness reasons. | ||
Currently, `const fn`s can do a minimal subset of operations. Here's |
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.
Looks accurate / what we said in the tracking issue / reference;
Are you looking for something specific?
cc @oli-obk
I’m told this might be the place to point out that https://github.com/rust-lang/rust/blob/master/RELEASES.md#version-1310-2018-12-06 seems incomplete: there is no mention |
I can write copy for clippy if y'all need. |
That would be awesome! |
You can change all the edition book links to point to stable: that book is being backported to the 1.31.0 release in rust-lang/rust#56518. |
Copy for clippy: ClippyRust's linter, Clippy is now considered 1.0, which carries the same lint stability guarantees as rustc. New lints may be added, and lints may be modified to add more functionality, however lints may never be removed (only deprecated). This means that code that compiles under clippy will continue to compile under clippy (provided there are no lints set to error via |
Yes. Feedback: I would have the rustup line as inline code, not para code to match In the first para, I would add a sentence about the number of lints, and/or some example lints, and say something about it being configurable so that people who haven't used it have more of an idea of what it does.
Might be worth expanding on this for people who are new to Rust |
(updated copy) |
Co-Authored-By: steveklabnik <[email protected]>
Co-Authored-By: steveklabnik <[email protected]>
Co-Authored-By: steveklabnik <[email protected]>
Co-Authored-By: steveklabnik <[email protected]>
Co-Authored-By: steveklabnik <[email protected]>
Co-Authored-By: steveklabnik <[email protected]>
Co-Authored-By: steveklabnik <[email protected]>
Co-Authored-By: steveklabnik <[email protected]>
Co-Authored-By: steveklabnik <[email protected]>
all of the work we've been doing over the past three years together, and create | ||
a cohesive package. This is more than just language features, it also includes | ||
|
||
* Tooling (IDE support, `rustfmt`, Clippy) |
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.
* Tooling (IDE support, `rustfmt`, Clippy) | |
* Tooling (Rustfmt, Clippy, IDE support) |
merged manually, thanks all! |
A first draft.
r? @rust-lang/core