Skip to content

Commit 8dc3bf7

Browse files
authored
Rollup merge of #92055 - tmandry:relnotes-1.58, r=pietroalbini
Add release notes for 1.58 r? `@rust-lang/release`
2 parents 02fe61b + 0e13d0c commit 8dc3bf7

File tree

1 file changed

+170
-0
lines changed

1 file changed

+170
-0
lines changed

RELEASES.md

+170
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,169 @@
1+
Version 1.58.0 (2022-01-13)
2+
==========================
3+
4+
Language
5+
--------
6+
7+
- [Format strings can now capture arguments simply by writing `{ident}` in the string.][90473] This works in all macros accepting format strings. Support for this in `panic!` (`panic!("{ident}")`) requires the 2021 edition; panic invocations in previous editions that appear to be trying to use this will result in a warning lint about not having the intended effect.
8+
- [`*const T` pointers can now be dereferenced in const contexts.][89551]
9+
- [The rules for when a generic struct implements `Unsize` have been relaxed.][90417]
10+
11+
Compiler
12+
--------
13+
14+
- [Add LLVM CFI support to the Rust compiler][89652]
15+
- [Stabilize -Z strip as -C strip][90058]. Note that while release builds already don't add debug symbols for the code you compile, the compiled standard library that ships with Rust includes debug symbols, so you may want to use the `strip` option to remove these symbols to produce smaller release binaries. Note that this release only includes support in rustc, not directly in cargo.
16+
- [Add support for LLVM coverage mapping format versions 5 and 6][91207]
17+
- [Emit LLVM optimization remarks when enabled with `-Cremark`][90833]
18+
- [Update the minimum external LLVM to 12][90175]
19+
- [Add `x86_64-unknown-none` at Tier 3*][89062]
20+
- [Build musl dist artifacts with debuginfo enabled][90733]. When building release binaries using musl, you may want to use the newly stabilized strip option to remove these debug symbols, reducing the size of your binaries.
21+
- [Don't abort compilation after giving a lint error][87337]
22+
- [Error messages point at the source of trait bound obligations in more places][89580]
23+
24+
\* Refer to Rust's [platform support page][platform-support-doc] for more
25+
information on Rust's tiered platform support.
26+
27+
Libraries
28+
---------
29+
30+
- [All remaining functions in the standard library have `#[must_use]` annotations where appropriate][89692], producing a warning when ignoring their return value. This helps catch mistakes such as expecting a function to mutate a value in place rather than return a new value.
31+
- [Paths are automatically canonicalized on Windows for operations that support it][89174]
32+
- [Re-enable debug checks for `copy` and `copy_nonoverlapping`][90041]
33+
- [Implement `RefUnwindSafe` for `Rc<T>`][87467]
34+
- [Make RSplit<T, P>: Clone not require T: Clone][90117]
35+
- [Implement `Termination` for `Result<Infallible, E>`][88601]. This allows writing `fn main() -> Result<Infallible, ErrorType>`, for a program whose successful exits never involve returning from `main` (for instance, a program that calls `exit`, or that uses `exec` to run another program).
36+
37+
Stabilized APIs
38+
---------------
39+
40+
- [`Metadata::is_symlink`]
41+
- [`Path::is_symlink`]
42+
- [`{integer}::saturating_div`]
43+
- [`Option::unwrap_unchecked`]
44+
- [`NonZero{unsigned}::is_power_of_two`]
45+
46+
These APIs are now usable in const contexts:
47+
48+
- [`Duration::new`]
49+
- [`Duration::checked_add`]
50+
- [`Duration::saturating_add`]
51+
- [`Duration::checked_sub`]
52+
- [`Duration::saturating_sub`]
53+
- [`Duration::checked_mul`]
54+
- [`Duration::saturating_mul`]
55+
- [`Duration::checked_div`]
56+
- [`MaybeUninit::as_ptr`]
57+
- [`MaybeUninit::as_mut_ptr`]
58+
- [`MaybeUninit::assume_init`]
59+
- [`MaybeUninit::assume_init_ref`]
60+
61+
Cargo
62+
-----
63+
64+
- [Add --message-format for install command][cargo/10107]
65+
- [Warn when alias shadows external subcommand][cargo/10082]
66+
67+
Rustdoc
68+
-------
69+
70+
- [Show all Deref implementations recursively in rustdoc][90183]
71+
- [Use computed visibility in rustdoc][88447]
72+
73+
Compatibility Notes
74+
-------------------
75+
76+
- [Try all stable method candidates first before trying unstable ones][90329]. This change ensures that adding new nightly-only methods to the Rust standard library will not break code invoking methods of the same name from traits outside the standard library.
77+
- Windows: [`std::process::Command` will no longer search the current directory for executables.][87704]
78+
- [All proc-macro backward-compatibility lints are now deny-by-default.][88041]
79+
- [proc_macro: Append .0 to unsuffixed float if it would otherwise become int token][90297]
80+
- [Refactor weak symbols in std::sys::unix][90846]. This optimizes accesses to glibc functions, by avoiding the use of dlopen. This does not increase the [minimum expected version of glibc](https://doc.rust-lang.org/nightly/rustc/platform-support.html). However, software distributions that use symbol versions to detect library dependencies, and which take weak symbols into account in that analysis, may detect rust binaries as requiring newer versions of glibc.
81+
- [rustdoc now rejects some unexpected semicolons in doctests][91026]
82+
83+
Internal Changes
84+
----------------
85+
86+
These changes provide no direct user facing benefits, but represent significant
87+
improvements to the internals and overall performance of rustc
88+
and related tools.
89+
90+
- [Implement coherence checks for negative trait impls][90104]
91+
- [Add rustc lint, warning when iterating over hashmaps][89558]
92+
- [Optimize live point computation][90491]
93+
- [Enable verification for 1/32nd of queries loaded from disk][90361]
94+
- [Implement version of normalize_erasing_regions that allows for normalization failure][91255]
95+
96+
[87337]: https://github.com/rust-lang/rust/pull/87337/
97+
[87467]: https://github.com/rust-lang/rust/pull/87467/
98+
[87704]: https://github.com/rust-lang/rust/pull/87704/
99+
[88041]: https://github.com/rust-lang/rust/pull/88041/
100+
[88300]: https://github.com/rust-lang/rust/pull/88300/
101+
[88447]: https://github.com/rust-lang/rust/pull/88447/
102+
[88601]: https://github.com/rust-lang/rust/pull/88601/
103+
[88624]: https://github.com/rust-lang/rust/pull/88624/
104+
[89062]: https://github.com/rust-lang/rust/pull/89062/
105+
[89174]: https://github.com/rust-lang/rust/pull/89174/
106+
[89542]: https://github.com/rust-lang/rust/pull/89542/
107+
[89551]: https://github.com/rust-lang/rust/pull/89551/
108+
[89558]: https://github.com/rust-lang/rust/pull/89558/
109+
[89580]: https://github.com/rust-lang/rust/pull/89580/
110+
[89652]: https://github.com/rust-lang/rust/pull/89652/
111+
[89677]: https://github.com/rust-lang/rust/pull/89677/
112+
[89951]: https://github.com/rust-lang/rust/pull/89951/
113+
[90041]: https://github.com/rust-lang/rust/pull/90041/
114+
[90058]: https://github.com/rust-lang/rust/pull/90058/
115+
[90104]: https://github.com/rust-lang/rust/pull/90104/
116+
[90117]: https://github.com/rust-lang/rust/pull/90117/
117+
[90175]: https://github.com/rust-lang/rust/pull/90175/
118+
[90183]: https://github.com/rust-lang/rust/pull/90183/
119+
[90297]: https://github.com/rust-lang/rust/pull/90297/
120+
[90329]: https://github.com/rust-lang/rust/pull/90329/
121+
[90361]: https://github.com/rust-lang/rust/pull/90361/
122+
[90417]: https://github.com/rust-lang/rust/pull/90417/
123+
[90473]: https://github.com/rust-lang/rust/pull/90473/
124+
[90491]: https://github.com/rust-lang/rust/pull/90491/
125+
[90733]: https://github.com/rust-lang/rust/pull/90733/
126+
[90833]: https://github.com/rust-lang/rust/pull/90833/
127+
[90846]: https://github.com/rust-lang/rust/pull/90846/
128+
[90896]: https://github.com/rust-lang/rust/pull/90896/
129+
[91026]: https://github.com/rust-lang/rust/pull/91026/
130+
[91207]: https://github.com/rust-lang/rust/pull/91207/
131+
[91255]: https://github.com/rust-lang/rust/pull/91255/
132+
[91301]: https://github.com/rust-lang/rust/pull/91301/
133+
[cargo/10082]: https://github.com/rust-lang/cargo/pull/10082/
134+
[cargo/10107]: https://github.com/rust-lang/cargo/pull/10107/
135+
[`Metadata::is_symlink`]: https://doc.rust-lang.org/stable/std/fs/struct.Metadata.html#method.is_symlink
136+
[`Path::is_symlink`]: https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.is_symlink
137+
[`{integer}::saturating_div`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.saturating_div
138+
[`Option::unwrap_unchecked`]: https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.unwrap_unchecked
139+
[`NonZero{unsigned}::is_power_of_two`]: https://doc.rust-lang.org/stable/std/num/struct.NonZeroU8.html#method.is_power_of_two
140+
[`unix::process::ExitStatusExt::core_dumped`]: https://doc.rust-lang.org/stable/std/os/unix/process/trait.ExitStatusExt.html#tymethod.core_dumped
141+
[`unix::process::ExitStatusExt::stopped_signal`]: https://doc.rust-lang.org/stable/std/os/unix/process/trait.ExitStatusExt.html#tymethod.stopped_signal
142+
[`unix::process::ExitStatusExt::continued`]: https://doc.rust-lang.org/stable/std/os/unix/process/trait.ExitStatusExt.html#tymethod.continued
143+
[`unix::process::ExitStatusExt::into_raw`]: https://doc.rust-lang.org/stable/std/os/unix/process/trait.ExitStatusExt.html#tymethod.into_raw
144+
[`Duration::new`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.new
145+
[`Duration::checked_add`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.checked_add
146+
[`Duration::saturating_add`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.saturating_add
147+
[`Duration::checked_sub`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.checked_sub
148+
[`Duration::saturating_sub`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.saturating_sub
149+
[`Duration::checked_mul`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.checked_mul
150+
[`Duration::saturating_mul`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.saturating_mul
151+
[`Duration::checked_div`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.checked_div
152+
[`Duration::as_secs_f64`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.as_secs_f64
153+
[`Duration::as_secs_f32`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.as_secs_f32
154+
[`Duration::from_secs_f64`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.from_secs_f64
155+
[`Duration::from_secs_f32`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.from_secs_f32
156+
[`Duration::mul_f64`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.mul_f64
157+
[`Duration::mul_f32`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.mul_f32
158+
[`Duration::div_f64`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.div_f64
159+
[`Duration::div_f32`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.div_f32
160+
[`Duration::div_duration_f64`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.div_duration_f64
161+
[`Duration::div_duration_f32`]: https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.div_duration_f32
162+
[`MaybeUninit::as_ptr`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.as_ptr
163+
[`MaybeUninit::as_mut_ptr`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.as_mut_ptr
164+
[`MaybeUninit::assume_init`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init
165+
[`MaybeUninit::assume_init_ref`]: https://doc.rust-lang.org/stable/std/mem/union.MaybeUninit.html#method.assume_init_ref
166+
1167
Version 1.57.0 (2021-12-02)
2168
==========================
3169

@@ -388,6 +554,10 @@ Compatibility Notes
388554
`Command` would cause them to be ASCII-uppercased.
389555
- [Rustdoc will now warn on using rustdoc lints that aren't prefixed
390556
with `rustdoc::`][86849]
557+
- `RUSTFLAGS` is no longer set for build scripts. Build scripts
558+
should use `CARGO_ENCODED_RUSTFLAGS` instead. See the
559+
[documentation](https://doc.rust-lang.org/nightly/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts)
560+
for more details.
391561

392562
[86849]: https://github.com/rust-lang/rust/pull/86849
393563
[86513]: https://github.com/rust-lang/rust/pull/86513

0 commit comments

Comments
 (0)