Skip to content

Commit 74ff7dc

Browse files
committed
Auto merge of #55194 - kennytm:rollup, r=kennytm
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())
2 parents dbab381 + 0724efd commit 74ff7dc

27 files changed

+504
-239
lines changed

RELEASES.md

+126
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,124 @@
1+
Version 1.30.0 (2018-10-25)
2+
==========================
3+
4+
Language
5+
--------
6+
- [Procedural macros are now available.][52081] These kinds of macros allow for
7+
more powerful code generation, there is a [new chapter available][proc-macros]
8+
in Rust Programming Language book that goes further in depth.
9+
- [You can now use keywords as identifiers using the raw identifiers
10+
syntax (`r#`).][53236] e.g. `let r#bool = true;`
11+
- [Using anonymous parameters in traits is now deprecated with a warning and
12+
will be a hard error in the 2018 edition.][53272]
13+
- [You can now use `crate` in paths.][54404] This allows you to refer to the
14+
crate root in the path. e.g. `use crate::foo;` refers to `foo` in `src/lib.rs`.
15+
- [Using a external crate now no longer requires being prefixed with `::`.][54404]
16+
e.g. previously using a external crate in a module without a use statement
17+
required `let json = ::serde_json::from_str(foo);` can now be written
18+
as `let json = serde_json::from_str(foo);`.
19+
- [You can now apply the `#[used]` attribute to static items to prevent the
20+
compiler from optimising them away even if they appear to be unused.][51363]
21+
e.g. `#[used] static FOO: u32 = 1;`
22+
- [You can now import and reexport macros from other crates with the `use`
23+
syntax.][50911] Macros exported with `#[macro_export]` are now placed into
24+
the root module of the crate. If your macro relies on calling other local
25+
macros it is recommended to export with the
26+
`#[macro_export(local_inner_macros)]` attribute so that users won't have to
27+
import those macros.
28+
- [`mod.rs` files are now optional.][54146] Previously if you had a `foo` module
29+
with a `bar` submodule, you would have `src/foo/mod.rs` and `src/foo/bar.rs`.
30+
Now you can have `src/foo.rs` and `src/foo/bar.rs` to achieve the same effect.
31+
- [You can now catch visibility keywords (e.g. `pub`, `pub(crate)`) in macros
32+
using the `vis` specifier.][53370]
33+
- [Non-macro attributes now allow all forms of literals not just
34+
strings.][53044] e.g. Previously you would write `#[attr("true")]` you can now
35+
write `#[attr(true)]`.
36+
- [You can now specify a function to handle a panic in the Rust runtime with the
37+
`#[panic_handler]` attribute.][51366]
38+
39+
Compiler
40+
--------
41+
- [Added the `riscv32imc-unknown-none-elf` target.][53822]
42+
- [Added the `aarch64-unknown-netbsd` target][53165]
43+
44+
Libraries
45+
---------
46+
- [`ManuallyDrop` now allows the inner type to be unsized.][53033]
47+
48+
Stabilized APIs
49+
---------------
50+
- [`Ipv4Addr::BROADCAST`]
51+
- [`Ipv4Addr::LOCALHOST`]
52+
- [`Ipv4Addr::UNSPECIFIED`]
53+
- [`Ipv6Addr::LOCALHOST`]
54+
- [`Ipv6Addr::UNSPECIFIED`]
55+
- [`Iterator::find_map`]
56+
57+
The following methods are a replacement methods for `trim_left`, `trim_right`,
58+
`trim_left_matches`, and `trim_right_matches`. Which will be deprecated
59+
in 1.33.0.
60+
- [`str::trim_end_matches`]
61+
- [`str::trim_end`]
62+
- [`str::trim_start_matches`]
63+
- [`str::trim_start`]
64+
65+
Cargo
66+
----
67+
- [`cargo run` doesn't require specifying a package in workspaces.][cargo/5877]
68+
- [`cargo doc` now supports `--message-format=json`.][cargo/5878] This is
69+
equivalent to calling `rustdoc --error-format=json`.
70+
- [You can specify which edition to create a project in cargo
71+
with `cargo new --edition`.][cargo/5984] Currently only `2015` is a
72+
valid option.
73+
- [Cargo will now provide a progress bar for builds.][cargo/5995]
74+
75+
Misc
76+
----
77+
- [`rustdoc` allows you to specify what edition to treat your code as with the
78+
`--edition` option.][54057]
79+
- [`rustdoc` now has the `--color` (Specify whether to output color) and
80+
`--error-format` (Specify error format e.g. `json`) options.][53003]
81+
- [We now distribute a `rust-gdbgui` script that invokes `gdbgui` with Rust
82+
debug symbols.][53774]
83+
- [Attributes from Rust tools such as `rustfmt` or `clippy` are now
84+
available.][53459] e.g. `#[rustfmt::skip]` will skip formatting the next item.
85+
86+
[50911]: https://github.com/rust-lang/rust/pull/50911/
87+
[51363]: https://github.com/rust-lang/rust/pull/51363/
88+
[51366]: https://github.com/rust-lang/rust/pull/51366/
89+
[52081]: https://github.com/rust-lang/rust/pull/52081/
90+
[53003]: https://github.com/rust-lang/rust/pull/53003/
91+
[53033]: https://github.com/rust-lang/rust/pull/53033/
92+
[53044]: https://github.com/rust-lang/rust/pull/53044/
93+
[53165]: https://github.com/rust-lang/rust/pull/53165/
94+
[53213]: https://github.com/rust-lang/rust/pull/53213/
95+
[53236]: https://github.com/rust-lang/rust/pull/53236/
96+
[53272]: https://github.com/rust-lang/rust/pull/53272/
97+
[53370]: https://github.com/rust-lang/rust/pull/53370/
98+
[53459]: https://github.com/rust-lang/rust/pull/53459/
99+
[53774]: https://github.com/rust-lang/rust/pull/53774/
100+
[53822]: https://github.com/rust-lang/rust/pull/53822/
101+
[54057]: https://github.com/rust-lang/rust/pull/54057/
102+
[54146]: https://github.com/rust-lang/rust/pull/54146/
103+
[54404]: https://github.com/rust-lang/rust/pull/54404/
104+
[cargo/5877]: https://github.com/rust-lang/cargo/pull/5877/
105+
[cargo/5878]: https://github.com/rust-lang/cargo/pull/5878/
106+
[cargo/5984]: https://github.com/rust-lang/cargo/pull/5984/
107+
[cargo/5995]: https://github.com/rust-lang/cargo/pull/5995/
108+
[proc-macros]: https://doc.rust-lang.org/book/2018-edition/ch19-06-macros.html
109+
110+
[`Ipv4Addr::BROADCAST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.BROADCAST
111+
[`Ipv4Addr::LOCALHOST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.LOCALHOST
112+
[`Ipv4Addr::UNSPECIFIED`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv4Addr.html#associatedconstant.UNSPECIFIED
113+
[`Ipv6Addr::LOCALHOST`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#associatedconstant.LOCALHOST
114+
[`Ipv6Addr::UNSPECIFIED`]: https://doc.rust-lang.org/nightly/std/net/struct.Ipv6Addr.html#associatedconstant.UNSPECIFIED
115+
[`Iterator::find_map`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.find_map
116+
[`str::trim_end_matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_end_matches
117+
[`str::trim_end`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_end
118+
[`str::trim_start_matches`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_start_matches
119+
[`str::trim_start`]: https://doc.rust-lang.org/nightly/std/primitive.str.html#method.trim_start
120+
121+
1122
Version 1.29.2 (2018-10-11)
2123
===========================
3124

@@ -6,6 +127,7 @@ Version 1.29.2 (2018-10-11)
6127

7128
[54639]: https://github.com/rust-lang/rust/pull/54639
8129

130+
9131
Version 1.29.1 (2018-09-25)
10132
===========================
11133

@@ -19,6 +141,7 @@ Security Notes
19141
Thank you to Scott McMurray for responsibily disclosing this vulnerability to
20142
us.
21143

144+
22145
Version 1.29.0 (2018-09-13)
23146
==========================
24147

@@ -73,7 +196,10 @@ Compatibility Notes
73196
Consider using the `home_dir` function from
74197
https://crates.io/crates/dirs instead.
75198
- [`rustc` will no longer silently ignore invalid data in target spec.][52330]
199+
- [`cfg` attributes and `--cfg` command line flags are now more
200+
strictly validated.][53893]
76201

202+
[53893]: https://github.com/rust-lang/rust/pull/53893/
77203
[52861]: https://github.com/rust-lang/rust/pull/52861/
78204
[52656]: https://github.com/rust-lang/rust/pull/52656/
79205
[52239]: https://github.com/rust-lang/rust/pull/52239/

src/liballoc/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -115,12 +115,10 @@
115115
#![feature(unsize)]
116116
#![feature(allocator_internals)]
117117
#![feature(on_unimplemented)]
118-
#![feature(chunks_exact)]
119118
#![feature(rustc_const_unstable)]
120119
#![feature(const_vec_new)]
121120
#![feature(slice_partition_dedup)]
122121
#![feature(maybe_uninit)]
123-
#![feature(rchunks)]
124122

125123
// Allow testing this library
126124

src/liballoc/slice.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ pub use core::slice::{from_raw_parts, from_raw_parts_mut};
123123
pub use core::slice::{from_ref, from_mut};
124124
#[stable(feature = "slice_get_slice", since = "1.28.0")]
125125
pub use core::slice::SliceIndex;
126-
#[unstable(feature = "chunks_exact", issue = "47115")]
126+
#[stable(feature = "chunks_exact", since = "1.31.0")]
127127
pub use core::slice::{ChunksExact, ChunksExactMut};
128-
#[unstable(feature = "rchunks", issue = "55177")]
128+
#[stable(feature = "rchunks", since = "1.31.0")]
129129
pub use core::slice::{RChunks, RChunksMut, RChunksExact, RChunksExactMut};
130130

131131
////////////////////////////////////////////////////////////////////////////////

src/liballoc/tests/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
#![feature(str_escape)]
2020
#![feature(try_reserve)]
2121
#![feature(unboxed_closures)]
22-
#![feature(chunks_exact)]
23-
#![feature(rchunks)]
2422
#![feature(repeat_generic_slice)]
2523

2624
extern crate alloc_system;

0 commit comments

Comments
 (0)