-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Updated RELEASES.md for 1.30.0 #54300
Conversation
RELEASES.md
Outdated
|
||
Language | ||
-------- | ||
- [This version marks the release of the 2018 edition of Rust.][54057] |
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 thought we were releasing Rust 2018 in December?
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.
Technically it's stable on master (soon to be beta)?
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.
See https://internals.rust-lang.org/t/rust-2018-release-schedule-and-extended-beta/8076.
First stable release of Rust 2018 should be in 2018-12-06 according to that.
cc @aturon
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.
Correct, this will be released in December, not part of 1.30. Although this is stable on the beta channel we will back it out at the last minute when branching to the stable channel in October. The Rust 2018 edition will not be usable on stable in the 1.30 release, but it will be usable in the 1.31 release
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 probably reword a bit to reflect 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.
1.30 stable will not have anything stabilized with regards to the edition itself, so we can probably just drop this note.
RELEASES.md
Outdated
Language | ||
-------- | ||
- [This version marks the release of the 2018 edition of Rust.][54057] | ||
- [In the 2018 edition you can now use `crate` visibility keyword.][54057] |
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 haven't stabilized crate
as a visibility modifier.
I don't see it mentioned, but macros can now be imported with the module system! Put another way, procedural macros are now enabled on stable in 1.30 along with importing macros via |
RELEASES.md
Outdated
- [You can now apply the `#[used]` attribute to static items to prevent the | ||
compiler from optimising them away even if they appear to be unused.][51363] | ||
e.g. `#[used] static FOO: u32 = 1;` | ||
- [You can now import and reexport macros using the `use` syntax.][50911] |
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.
Proc macro definitions (#[proc_macro]
/#[proc_macro_attribute]
) was stabilized in 1.29 (#52081), but never mentioned in release notes.
In 1.30 there's no reason to be secretive about it, so it can be announced.
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.
Tool attributes (#[rustfmt::skip]
) are stabilized in 1.30 (#53459).
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.
To clarify there is no intent to be secretive about the feature. The first draft of the release notes is always just the PRs merged in the six weeks between the releases editorialised by me, with PRs tagged as relnotes
always included.
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.
@petrochenkov Could you perhaps explain when you would use #[macro_export(local_inner_macros)]
I understand the problem as laid out in the issue but I don't really know how to explain this to an end user of 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.
@Aaronepower A lot of crates were written with complex macros prior to this new system, assuming that #[macro_export]
macros were always available to them. For example, Diesel has several macros that call inner helper macros, either for the purposes of factoring code, or for #[cfg]
ing behavior. With the new system, a macro like __diesel_parse_table!
wouldn't be available to table!
unless it was explicitly imported by our users, or we put $crate::
in front. The former would be ridiculous, and the latter is incompatible with Rust 2015 users. Hence, this attribute.
RELEASES.md
Outdated
|
||
Language | ||
-------- | ||
- [This version marks the release of the 2018 edition of Rust.][54057] |
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.
1.30 stable will not have anything stabilized with regards to the edition itself, so we can probably just drop this note.
RELEASES.md
Outdated
- [In the 2018 edition you can now use `crate` visibility keyword.][54057] | ||
Equivalent to `pub(crate)`. | ||
- [You can now use keywords as identifiers using the raw identifiers | ||
syntax (`r#`).][53236] e.g. `let r#struct = 2018;` |
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.
Can we drop the 2018
from the example? I think it might cause confusion since this feature works on 2015 too I believe.
RELEASES.md
Outdated
- [You can now use keywords as identifiers using the raw identifiers | ||
syntax (`r#`).][53236] e.g. `let r#struct = 2018;` | ||
- [Using anonymous parameters in traits is now deprecated with a warning and is | ||
a hard error in the 2018 edition.][53272] |
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.
Here as well -- 'will be a hard error' would be better wording I think.
RELEASES.md
Outdated
|
||
Cargo | ||
----- | ||
- [`cargo run` now works in workspaces.][cargo/5877] |
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 "doesn't require specifying a package in workspaces"
RELEASES.md
Outdated
e.g. `#[used] static FOO: u32 = 1;` | ||
- [You can now import and reexport macros using the `use` syntax.][50911] | ||
- [`mod.rs` files are now optional, you can now have `src/foo.rs` and | ||
`src/foo/bar.rs` to define module dependencies.][54146] |
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 sentence is really confusing to me. I'm not sure where bar.rs
comes into play here, shouldn't we be comparing it to src/foo/mod.rs
?
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's the combination that's new. Before, if you wanted a src/foo/bar.rs
module, you also had to use src/foo/mod.rs
for its parent. Now the parent can just be src/foo.rs
.
RELEASES.md
Outdated
|
||
Compatibility notes | ||
------------------- | ||
- [`cfg` attributes and `--cfg` command line flags are now 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.
The stricter --cfg
validation went out in 1.29.
1.30 also stabilized |
☔ The latest upstream changes (presumably #54660) made this pull request unmergeable. Please resolve the merge conflicts. |
RELEASES.md
Outdated
- [`cargo doc` now supports `--message-format=json`.][cargo/5878] This is | ||
equivalent to calling `rustdoc --error-format=json`. | ||
- [You can specify which edition to create a project in cargo | ||
with `cargo new --edition`.][cargo/5984] |
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.
Could you add a note that the only stable option is 2015 until next release?
RELEASES.md
Outdated
requirement for the code to work, it will now be inferred. | ||
- [You can now catch visibility keywords (e.g. `pub`, `pub(crate)`) in macros | ||
using the `vis` specifier.][53370] | ||
- [Non-macros attributes now allow all forms of literals not just |
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.
Typo: s/Non-macros/Non-macro/
fbfec86
to
678fdb7
Compare
RELEASES.md
Outdated
- [You can now use `crate` in paths.][54404] This allows you to refer to the | ||
crate root in the path. e.g. `use crate::foo;` refers to `foo` in `src/lib.rs`. | ||
- [`extern crate` definitions are now optional.][54404] To use a external crate | ||
you can simply have `use serde;` and add the `serde` dependency in `Cargo.toml` |
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.
use serde;
is a part of 2018 edition, so it's not in 1.30 yet and extern crate
items are still required for imports.
Stabilized feature(extern_prelude)
works only for relative paths (let x = my_crate::Thing();
), not imports.
Imports are still relative to the crate root on 2015 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.
#49789 contains more detailed description and test examples.
☔ The latest upstream changes (presumably #54865) made this pull request unmergeable. Please resolve the merge conflicts. |
RELEASES.md
Outdated
Now you can have `src/foo.rs` and `src/foo/bar.rs` to achieve the same effect. | ||
- [`rustc` can now infer certain outlives requirements.][53793] e.g. In this | ||
example `struct Foo<'a, T: 'a>(&'a T);` you now no longer need the `T: 'a` | ||
requirement for the code to work, it will now be inferred. |
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 needs to be removed as we've backed it out recently due to some bugs.
391118f
to
ec47df2
Compare
Should we merge this? |
@pietroalbini At the moment it's waiting on a url for the chapter on proc macros, but that can be a seperate PR. |
Hm, could we guess what that URL will be and add that? We'll want a beta backport here as well so it'd be good to land this sooner rather than later |
Pinging @steveklabnik |
This week is really rough for me; I can't afford to dig into it right now. You could look at the book's master and sort it, though. Sorry about that! I can get back to you Monday. |
@bors delegate+ |
✌️ @Aaronepower can now approve this pull request |
@bors r+ |
📌 Commit 518a5a4 has been approved by |
@bors rollup |
Updated RELEASES.md for 1.30.0 [Rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md) r? @Mark-Simulacrum cc @rust-lang/release
[beta] Rollup backports Merged and approved: * #54300: Updated RELEASES.md for 1.30.0 * #54939: rustdoc: don't prefer dynamic linking in doc tests * #54671: resolve: Scale back hard-coded extern prelude additions on 2015 edition * #55102: resolve: Do not skip extern prelude during speculative resolution r? @ghost
Updated RELEASES.md for 1.30.0 [Rendered](https://github.com/Aaronepower/rust/blob/master/RELEASES.md) r? @Mark-Simulacrum cc @rust-lang/release
Rollup of 7 pull requests Successful merges: - #54300 (Updated RELEASES.md for 1.30.0) - #55013 ([NLL] Propagate bounds from generators) - #55071 (Fix ICE and report a human readable error) - #55144 (Cleanup resolve) - #55166 (Don't warn about parentheses on `match (return)`) - #55169 (Add a `copysign` function to f32 and f64) - #55178 (Stabilize slice::chunks_exact(), chunks_exact_mut(), rchunks(), rchunks_mut(), rchunks_exact(), rchunks_exact_mut())
Rendered
r? @Mark-Simulacrum
cc @rust-lang/release