Skip to content

Commit 66a356d

Browse files
committed
Auto merge of #97084 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] Rust 1.61 * Cherry-picking release notes from not yet landed #96539. r? `@Mark-Simulacrum`
2 parents 30a5146 + 6a51206 commit 66a356d

File tree

2 files changed

+289
-1
lines changed

2 files changed

+289
-1
lines changed

RELEASES.md

+288
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,291 @@
1+
Version 1.61.0 (2022-05-19)
2+
==========================
3+
4+
Language
5+
--------
6+
7+
- [`const fn` signatures can now include generic trait bounds][93827]
8+
- [`const fn` signatures can now use `impl Trait` in argument and return position][93827]
9+
- [Function pointers can now be created, cast, and passed around in a `const fn`][93827]
10+
- [Recursive calls can now set the value of a function's opaque `impl Trait` return type][94081]
11+
12+
Compiler
13+
--------
14+
15+
- [Linking modifier syntax in `#[link]` attributes and on the command line, as well as the `whole-archive` modifier specifically, are now supported][93901]
16+
- [The `char` type is now described as UTF-32 in debuginfo][89887]
17+
- The [`#[target_feature]`][target_feature] attribute [can now be used with aarch64 features][90621]
18+
- X86 [`#[target_feature = "adx"]` is now stable][93745]
19+
20+
Libraries
21+
---------
22+
23+
- [`ManuallyDrop<T>` is now documented to have the same layout as `T`][88375]
24+
- [`#[ignore = "…"]` messages are printed when running tests][92714]
25+
- [Consistently present absent stdio handles on Windows as NULL handles][93263]
26+
- [Make `std::io::stdio::lock()` return `'static` handles.][93965] Previously, the creation of locked handles to stdin/stdout/stderr would borrow the handles being locked, which prevented writing `let out = std::io::stdout().lock();` because `out` would outlive the return value of `stdout()`. Such code now works, eliminating a common pitfall that affected many Rust users.
27+
- [`Vec::from_raw_parts` is now less restrictive about its inputs][95016]
28+
- [`std::thread::available_parallelism` now takes cgroup quotas into account.][92697] Since `available_parallelism` is often used to create a thread pool for parallel computation, which may be CPU-bound for performance, `available_parallelism` will return a value consistent with the ability to use that many threads continuously, if possible. For instance, in a container with 8 virtual CPUs but quotas only allowing for 50% usage, `available_parallelism` will return 4.
29+
30+
Stabilized APIs
31+
---------------
32+
33+
- [`Pin::static_mut`]
34+
- [`Pin::static_ref`]
35+
- [`Vec::retain_mut`]
36+
- [`VecDeque::retain_mut`]
37+
- [`Write` for `Cursor<[u8; N]>`][cursor-write-array]
38+
- [`std::os::unix::net::SocketAddr::from_pathname`]
39+
- [`std::process::ExitCode`] and [`std::process::Termination`]. The stabilization of these two APIs now makes it possible for programs to return errors from `main` with custom exit codes.
40+
- [`std::thread::JoinHandle::is_finished`]
41+
42+
These APIs are now usable in const contexts:
43+
44+
- [`*const T::offset` and `*mut T::offset`][ptr-offset]
45+
- [`*const T::wrapping_offset` and `*mut T::wrapping_offset`][ptr-wrapping_offset]
46+
- [`*const T::add` and `*mut T::add`][ptr-add]
47+
- [`*const T::sub` and `*mut T::sub`][ptr-sub]
48+
- [`*const T::wrapping_add` and `*mut T::wrapping_add`][ptr-wrapping_add]
49+
- [`*const T::wrapping_sub` and `*mut T::wrapping_sub`][ptr-wrapping_sub]
50+
- [`[T]::as_mut_ptr`][slice-as_mut_ptr]
51+
- [`[T]::as_ptr_range`][slice-as_ptr_range]
52+
- [`[T]::as_mut_ptr_range`][slice-as_mut_ptr_range]
53+
54+
Cargo
55+
-----
56+
57+
No feature changes, but see compatibility notes.
58+
59+
Compatibility Notes
60+
-------------------
61+
62+
- Previously native static libraries were linked as `whole-archive` in some cases, but now rustc tries not to use `whole-archive` unless explicitly requested. This [change][93901] may result in linking errors in some cases. To fix such errors, native libraries linked from the command line, build scripts, or [`#[link]` attributes][link-attr] need to
63+
- (more common) either be reordered to respect dependencies between them (if `a` depends on `b` then `a` should go first and `b` second)
64+
- (less common) or be updated to use the [`+whole-archive`] modifier.
65+
- [Catching a second unwind from FFI code while cleaning up from a Rust panic now causes the process to abort][92911]
66+
- [Proc macros no longer see `ident` matchers wrapped in groups][92472]
67+
- [The number of `#` in `r#` raw string literals is now required to be less than 256][95251]
68+
- [When checking that a dyn type satisfies a trait bound, supertrait bounds are now enforced][92285]
69+
- [`cargo vendor` now only accepts one value for each `--sync` flag][cargo/10448]
70+
- [`cfg` predicates in `all()` and `any()` are always evaluated to detect errors, instead of short-circuiting.][94295] The compatibility considerations here arise in nightly-only code that used the short-circuiting behavior of `all` to write something like `cfg(all(feature = "nightly", syntax-requiring-nightly))`, which will now fail to compile. Instead, use either `cfg_attr(feature = "nightly", ...)` or nested uses of `cfg`.
71+
- [bootstrap: static-libstdcpp is now enabled by default, and can now be disabled when llvm-tools is enabled][94832]
72+
73+
Internal Changes
74+
----------------
75+
76+
These changes provide no direct user facing benefits, but represent significant
77+
improvements to the internals and overall performance of rustc
78+
and related tools.
79+
80+
- [debuginfo: Refactor debuginfo generation for types][94261]
81+
- [Remove the everybody loops pass][93913]
82+
83+
[88375]: https://github.com/rust-lang/rust/pull/88375/
84+
[89887]: https://github.com/rust-lang/rust/pull/89887/
85+
[90621]: https://github.com/rust-lang/rust/pull/90621/
86+
[92285]: https://github.com/rust-lang/rust/pull/92285/
87+
[92472]: https://github.com/rust-lang/rust/pull/92472/
88+
[92663]: https://github.com/rust-lang/rust/pull/92663/
89+
[92697]: https://github.com/rust-lang/rust/pull/92697/
90+
[92714]: https://github.com/rust-lang/rust/pull/92714/
91+
[92911]: https://github.com/rust-lang/rust/pull/92911/
92+
[93263]: https://github.com/rust-lang/rust/pull/93263/
93+
[93580]: https://github.com/rust-lang/rust/pull/93580/
94+
[93745]: https://github.com/rust-lang/rust/pull/93745/
95+
[93827]: https://github.com/rust-lang/rust/pull/93827/
96+
[93840]: https://github.com/rust-lang/rust/pull/93840/
97+
[93901]: https://github.com/rust-lang/rust/pull/93901/
98+
[93913]: https://github.com/rust-lang/rust/pull/93913/
99+
[93957]: https://github.com/rust-lang/rust/pull/93957/
100+
[93965]: https://github.com/rust-lang/rust/pull/93965/
101+
[94081]: https://github.com/rust-lang/rust/pull/94081/
102+
[94261]: https://github.com/rust-lang/rust/pull/94261/
103+
[94295]: https://github.com/rust-lang/rust/pull/94295/
104+
[94356]: https://github.com/rust-lang/rust/pull/94356/
105+
[94832]: https://github.com/rust-lang/rust/pull/94832/
106+
[95016]: https://github.com/rust-lang/rust/pull/95016/
107+
[95130]: https://github.com/rust-lang/rust/pull/95130/
108+
[95251]: https://github.com/rust-lang/rust/pull/95251/
109+
[95491]: https://github.com/rust-lang/rust/pull/95491/
110+
[`+whole-archive`]: https://doc.rust-lang.org/stable/rustc/command-line-arguments.html#linking-modifiers-whole-archive
111+
[`Pin::static_mut`]: https://doc.rust-lang.org/stable/std/pin/struct.Pin.html#method.static_mut
112+
[`Pin::static_ref`]: https://doc.rust-lang.org/stable/std/pin/struct.Pin.html#method.static_ref
113+
[`Vec::retain_mut`]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.retain_mut
114+
[`VecDeque::retain_mut`]: https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.retain_mut
115+
[`std::os::unix::net::SocketAddr::from_pathname`]: https://doc.rust-lang.org/stable/std/os/unix/net/struct.SocketAddr.html#method.from_pathname
116+
[`std::process::ExitCode`]: https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html
117+
[`std::process::Termination`]: https://doc.rust-lang.org/stable/std/process/trait.Termination.html
118+
[`std::thread::JoinHandle::is_finished`]: https://doc.rust-lang.org/stable/std/thread/struct.JoinHandle.html#method.is_finished
119+
[cargo/10448]: https://github.com/rust-lang/cargo/pull/10448/
120+
[cursor-write-array]: https://doc.rust-lang.org/stable/std/io/struct.Cursor.html#impl-Write-4
121+
[link-attr]: https://doc.rust-lang.org/stable/reference/items/external-blocks.html#the-link-attribute
122+
[ptr-add]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.add
123+
[ptr-offset]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset
124+
[ptr-sub]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.sub
125+
[ptr-wrapping_add]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.wrapping_add
126+
[ptr-wrapping_offset]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.wrapping_offset
127+
[ptr-wrapping_sub]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.wrapping_sub
128+
[slice-as_mut_ptr]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_ptr
129+
[slice-as_mut_ptr_range]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_mut_ptr_range
130+
[slice-as_ptr_range]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.as_ptr_range
131+
[target_feature]: https://doc.rust-lang.org/reference/attributes/codegen.html#the-target_feature-attribute
132+
133+
134+
Version 1.60.0 (2022-04-07)
135+
==========================
136+
137+
Language
138+
--------
139+
- [Stabilize `#[cfg(panic = "...")]` for either `"unwind"` or `"abort"`.][93658]
140+
- [Stabilize `#[cfg(target_has_atomic = "...")]` for each integer size and `"ptr"`.][93824]
141+
142+
Compiler
143+
--------
144+
- [Enable combining `+crt-static` and `relocation-model=pic` on `x86_64-unknown-linux-gnu`][86374]
145+
- [Fixes wrong `unreachable_pub` lints on nested and glob public reexport][87487]
146+
- [Stabilize `-Z instrument-coverage` as `-C instrument-coverage`][90132]
147+
- [Stabilize `-Z print-link-args` as `--print link-args`][91606]
148+
- [Add new Tier 3 target `mips64-openwrt-linux-musl`\*][92300]
149+
- [Add new Tier 3 target `armv7-unknown-linux-uclibceabi` (softfloat)\*][92383]
150+
- [Fix invalid removal of newlines from doc comments][92357]
151+
- [Add kernel target for RustyHermit][92670]
152+
- [Deny mixing bin crate type with lib crate types][92933]
153+
- [Make rustc use `RUST_BACKTRACE=full` by default][93566]
154+
- [Upgrade to LLVM 14][93577]
155+
156+
\* Refer to Rust's [platform support page][platform-support-doc] for more
157+
information on Rust's tiered platform support.
158+
159+
Libraries
160+
---------
161+
- [Guarantee call order for `sort_by_cached_key`][89621]
162+
- [Improve `Duration::try_from_secs_f32`/`f64` accuracy by directly processing exponent and mantissa][90247]
163+
- [Make `Instant::{duration_since, elapsed, sub}` saturating][89926]
164+
- [Remove non-monotonic clocks workarounds in `Instant::now`][89926]
165+
- [Make `BuildHasherDefault`, `iter::Empty` and `future::Pending` covariant][92630]
166+
167+
Stabilized APIs
168+
---------------
169+
- [`Arc::new_cyclic`][arc_new_cyclic]
170+
- [`Rc::new_cyclic`][rc_new_cyclic]
171+
- [`slice::EscapeAscii`][slice_escape_ascii]
172+
- [`<[u8]>::escape_ascii`][slice_u8_escape_ascii]
173+
- [`u8::escape_ascii`][u8_escape_ascii]
174+
- [`Vec::spare_capacity_mut`][vec_spare_capacity_mut]
175+
- [`MaybeUninit::assume_init_drop`][assume_init_drop]
176+
- [`MaybeUninit::assume_init_read`][assume_init_read]
177+
- [`i8::abs_diff`][i8_abs_diff]
178+
- [`i16::abs_diff`][i16_abs_diff]
179+
- [`i32::abs_diff`][i32_abs_diff]
180+
- [`i64::abs_diff`][i64_abs_diff]
181+
- [`i128::abs_diff`][i128_abs_diff]
182+
- [`isize::abs_diff`][isize_abs_diff]
183+
- [`u8::abs_diff`][u8_abs_diff]
184+
- [`u16::abs_diff`][u16_abs_diff]
185+
- [`u32::abs_diff`][u32_abs_diff]
186+
- [`u64::abs_diff`][u64_abs_diff]
187+
- [`u128::abs_diff`][u128_abs_diff]
188+
- [`usize::abs_diff`][usize_abs_diff]
189+
- [`Display for io::ErrorKind`][display_error_kind]
190+
- [`From<u8> for ExitCode`][from_u8_exit_code]
191+
- [`Not for !` (the "never" type)][not_never]
192+
- [_Op_`Assign<$t> for Wrapping<$t>`][wrapping_assign_ops]
193+
- [`arch::is_aarch64_feature_detected!`][is_aarch64_feature_detected]
194+
195+
Cargo
196+
-----
197+
- [Port cargo from `toml-rs` to `toml_edit`][cargo/10086]
198+
- [Stabilize `-Ztimings` as `--timings`][cargo/10245]
199+
- [Stabilize namespaced and weak dependency features.][cargo/10269]
200+
- [Accept more `cargo:rustc-link-arg-*` types from build script output.][cargo/10274]
201+
- [cargo-new should not add ignore rule on Cargo.lock inside subdirs][cargo/10379]
202+
203+
Misc
204+
----
205+
- [Ship docs on Tier 2 platforms by reusing the closest Tier 1 platform docs][92800]
206+
- [Drop rustc-docs from complete profile][93742]
207+
- [bootstrap: tidy up flag handling for llvm build][93918]
208+
209+
Compatibility Notes
210+
-------------------
211+
- [Remove compiler-rt linking hack on Android][83822]
212+
- [Mitigations for platforms with non-monotonic clocks have been removed from
213+
`Instant::now`][89926]. On platforms that don't provide monotonic clocks, an
214+
instant is not guaranteed to be greater than an earlier instant anymore.
215+
- [`Instant::{duration_since, elapsed, sub}` do not panic anymore on underflow,
216+
saturating to `0` instead][89926]. In the real world the panic happened mostly
217+
on platforms with buggy monotonic clock implementations rather than catching
218+
programming errors like reversing the start and end times. Such programming
219+
errors will now results in `0` rather than a panic.
220+
- In a future release we're planning to increase the baseline requirements for
221+
the Linux kernel to version 3.2, and for glibc to version 2.17. We'd love
222+
your feedback in [PR #95026][95026].
223+
224+
Internal Changes
225+
----------------
226+
227+
These changes provide no direct user facing benefits, but represent significant
228+
improvements to the internals and overall performance of rustc
229+
and related tools.
230+
231+
- [Switch all libraries to the 2021 edition][92068]
232+
233+
[83822]: https://github.com/rust-lang/rust/pull/83822
234+
[86374]: https://github.com/rust-lang/rust/pull/86374
235+
[87487]: https://github.com/rust-lang/rust/pull/87487
236+
[89621]: https://github.com/rust-lang/rust/pull/89621
237+
[89926]: https://github.com/rust-lang/rust/pull/89926
238+
[90132]: https://github.com/rust-lang/rust/pull/90132
239+
[90247]: https://github.com/rust-lang/rust/pull/90247
240+
[91606]: https://github.com/rust-lang/rust/pull/91606
241+
[92068]: https://github.com/rust-lang/rust/pull/92068
242+
[92300]: https://github.com/rust-lang/rust/pull/92300
243+
[92357]: https://github.com/rust-lang/rust/pull/92357
244+
[92383]: https://github.com/rust-lang/rust/pull/92383
245+
[92630]: https://github.com/rust-lang/rust/pull/92630
246+
[92670]: https://github.com/rust-lang/rust/pull/92670
247+
[92800]: https://github.com/rust-lang/rust/pull/92800
248+
[92933]: https://github.com/rust-lang/rust/pull/92933
249+
[93566]: https://github.com/rust-lang/rust/pull/93566
250+
[93577]: https://github.com/rust-lang/rust/pull/93577
251+
[93658]: https://github.com/rust-lang/rust/pull/93658
252+
[93742]: https://github.com/rust-lang/rust/pull/93742
253+
[93824]: https://github.com/rust-lang/rust/pull/93824
254+
[93918]: https://github.com/rust-lang/rust/pull/93918
255+
[95026]: https://github.com/rust-lang/rust/pull/95026
256+
257+
[cargo/10086]: https://github.com/rust-lang/cargo/pull/10086
258+
[cargo/10245]: https://github.com/rust-lang/cargo/pull/10245
259+
[cargo/10269]: https://github.com/rust-lang/cargo/pull/10269
260+
[cargo/10274]: https://github.com/rust-lang/cargo/pull/10274
261+
[cargo/10379]: https://github.com/rust-lang/cargo/pull/10379
262+
263+
[arc_new_cyclic]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.new_cyclic
264+
[rc_new_cyclic]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.new_cyclic
265+
[slice_escape_ascii]: https://doc.rust-lang.org/stable/std/slice/struct.EscapeAscii.html
266+
[slice_u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.escape_ascii
267+
[u8_escape_ascii]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.escape_ascii
268+
[vec_spare_capacity_mut]: https://doc.rust-lang.org/stable/std/vec/struct.Vec.html#method.spare_capacity_mut
269+
[assume_init_drop]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_drop
270+
[assume_init_read]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_read
271+
[i8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.abs_diff
272+
[i16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.abs_diff
273+
[i32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.abs_diff
274+
[i64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.abs_diff
275+
[i128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.abs_diff
276+
[isize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.abs_diff
277+
[u8_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.abs_diff
278+
[u16_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.abs_diff
279+
[u32_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.abs_diff
280+
[u64_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.abs_diff
281+
[u128_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.abs_diff
282+
[usize_abs_diff]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.abs_diff
283+
[display_error_kind]: https://doc.rust-lang.org/stable/std/io/enum.ErrorKind.html#impl-Display
284+
[from_u8_exit_code]: https://doc.rust-lang.org/stable/std/process/struct.ExitCode.html#impl-From%3Cu8%3E
285+
[not_never]: https://doc.rust-lang.org/stable/std/primitive.never.html#impl-Not
286+
[wrapping_assign_ops]: https://doc.rust-lang.org/stable/std/num/struct.Wrapping.html#trait-implementations
287+
[is_aarch64_feature_detected]: https://doc.rust-lang.org/stable/std/arch/macro.is_aarch64_feature_detected.html
288+
1289
Version 1.59.0 (2022-02-24)
2290
==========================
3291

src/ci/channel

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
beta
1+
stable

0 commit comments

Comments
 (0)