-
Notifications
You must be signed in to change notification settings - Fork 291
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.21 announcement #203
1.21 announcement #203
Conversation
_posts/2017-10-12-Rust-1.21.md
Outdated
preview, and you'll hear more about these plans in the future. | ||
|
||
Finally, a few documentation improvements. First up, if you visit [the docs | ||
for `std::os`] (https://doc.rust-lang.org/stable/std/os/), which contains |
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 isn't rendering right (extra space?)
Here are the other libs stabilizations in 1.21.
(The PRs say 1.22 but they were backported in rust-lang/rust#44824.) |
`rustup component add rls-preview`. In general, many useful Rust developer | ||
tools such as the RLS, Clippy, and `rustfmt` need nightly Rust; this is the | ||
first steps toward having them work on stable Rust. Please check out the | ||
preview, and you'll hear more about these plans in the future. |
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 link to an RLS blog post or something?
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.
yeah i wasn't sure what the best place to link was; @nrc any ideas?
_posts/2017-10-12-Rust-1.21.md
Outdated
doc.crates.io. Future releases will move Cargo's docs over, and at that point, | ||
doc.crates.io will redirect to doc.rust-lang.org/cargo. Cargo's docs have long | ||
needed a refreshing, so expect to hear more news about Cargo's docs generally | ||
through the end of the year. |
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 remove "through the end of the year"? I'd expect we'd continue to work on them indefinitely.
_posts/2017-10-12-Rust-1.21.md
Outdated
|
||
Finally, [`std::mem::discriminant` has been | ||
stabilized](https://doc.rust-lang.org/std/mem/fn.discriminant.html), allowing | ||
you to see what variant an `enum` is. |
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 add "without using matching"? This may be misleading to newcomers otherwise.
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.
And maybe "an enum
value" or "an enum
instance`"?
_posts/2017-10-12-Rust-1.21.md
Outdated
|
||
```rust | ||
let _x = 5; | ||
let x = &x; |
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 code doesn't compile.....
error[E0425]: cannot find value `x` in this scope
--> src/main.rs:3:10
|
3 | let x = &x;
| ^ did you mean `_x`?
I think it should be:
let x = 5;
let x = &x;
?
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.
&_x
was what I intended; it depends if you think that shadowing obscures or helps the example. oops!
_posts/2017-10-12-Rust-1.21.md
Outdated
version of the documentation has been Linux-specific; this is a first step towards | ||
rectifying that. This is [specific to the standard | ||
library](https://github.com/rust-lang/rust/pull/43348) and not for general use; | ||
we'll hope to improve this further in the future. |
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 this could just be "we hope" instead of "we'll hope"?
_posts/2017-10-12-Rust-1.21.md
Outdated
|
||
Next, [Cargo's docs are moving!](https://github.com/rust-lang/rust/pull/43916) | ||
Historically, Cargo's docs were hosted on doc.crates.io, which doesn't follow | ||
the release train model, even though Cargo itself does. This lead to situations |
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 lead to/This led to/
_posts/2017-10-12-Rust-1.21.md
Outdated
|
||
Finally, [`std::mem::discriminant` has been | ||
stabilized](https://doc.rust-lang.org/std/mem/fn.discriminant.html), allowing | ||
you to see what variant an `enum` is. |
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.
And maybe "an enum
value" or "an enum
instance`"?
quality of life change: due to the lack of type-level integers, arrays only | ||
supported various traits up to size 32. This [has now been fixed for the | ||
`Clone` trait](https://github.com/rust-lang/rust/pull/43690), which also | ||
caused a lot of ICEs at times, when a type would be `Copy` but not `Clone`. |
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 spell out ICE here, people might not know what the acronym means.
caused a lot of ICEs at times, when a type would be `Copy` but not `Clone`. | ||
For other traits, [an RFC for type-level integers was accepted | ||
recently](https://github.com/rust-lang/rfcs/blob/master/text/2000-const-generics.md), | ||
which may help with this situation. That change has yet to be implemented, however, |
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.
which may help with this situation
It will definitely help.
just a draft, please check it out @rust-lang/core !
The library stuff seems... light. @rust-lang/libs is this all that was done this cycle?