Skip to content

Commit 84c898d

Browse files
committed
Auto merge of #110413 - pietroalbini:pa-1.69.0-stable, r=pietroalbini
[stable] Prepare Rust 1.69.0 Last minute backports: * #109643 * #110135 * #109938 * #109937 * #109266 This PR also bumps the channel to stable, and backports the release notes from master. r? `@ghost` cc `@rust-lang/release`
2 parents f18236d + c2c413f commit 84c898d

File tree

19 files changed

+365
-200
lines changed

19 files changed

+365
-200
lines changed

RELEASES.md

+227-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,225 @@
1+
Version 1.69.0 (2023-04-20)
2+
==========================
3+
4+
<a id="1.69.0-Language"></a>
5+
6+
Language
7+
--------
8+
9+
- [Deriving built-in traits on packed structs works with `Copy` fields.](https://github.com/rust-lang/rust/pull/104429/)
10+
- [Stabilize the `cmpxchg16b` target feature on x86 and x86_64.](https://github.com/rust-lang/rust/pull/106774/)
11+
- [Improve analysis of trait bounds for associated types.](https://github.com/rust-lang/rust/pull/103695/)
12+
- [Allow associated types to be used as union fields.](https://github.com/rust-lang/rust/pull/106938/)
13+
- [Allow `Self: Autotrait` bounds on dyn-safe trait methods.](https://github.com/rust-lang/rust/pull/107082/)
14+
- [Treat `str` as containing `[u8]` for auto trait purposes.](https://github.com/rust-lang/rust/pull/107941/)
15+
16+
<a id="1.69.0-Compiler"></a>
17+
18+
Compiler
19+
--------
20+
21+
- [Upgrade `*-pc-windows-gnu` on CI to mingw-w64 v10 and GCC 12.2.](https://github.com/rust-lang/rust/pull/100178/)
22+
- [Rework min_choice algorithm of member constraints.](https://github.com/rust-lang/rust/pull/105300/)
23+
- [Support `true` and `false` as boolean flags in compiler arguments.](https://github.com/rust-lang/rust/pull/107043/)
24+
- [Default `repr(C)` enums to `c_int` size.](https://github.com/rust-lang/rust/pull/107592/)
25+
26+
<a id="1.69.0-Libraries"></a>
27+
28+
Libraries
29+
---------
30+
31+
- [Implement the unstable `DispatchFromDyn` for cell types, allowing downstream experimentation with custom method receivers.](https://github.com/rust-lang/rust/pull/97373/)
32+
- [Document that `fmt::Arguments::as_str()` may return `Some(_)` in more cases after optimization, subject to change.](https://github.com/rust-lang/rust/pull/106823/)
33+
- [Implement `AsFd` and `AsRawFd` for `Rc`.](https://github.com/rust-lang/rust/pull/107317/)
34+
35+
<a id="1.69.0-Stabilized-APIs"></a>
36+
37+
Stabilized APIs
38+
---------------
39+
40+
- [`CStr::from_bytes_until_nul`](https://doc.rust-lang.org/stable/core/ffi/struct.CStr.html#method.from_bytes_until_nul)
41+
- [`core::ffi::FromBytesUntilNulError`](https://doc.rust-lang.org/stable/core/ffi/struct.FromBytesUntilNulError.html)
42+
43+
These APIs are now stable in const contexts:
44+
45+
- [`SocketAddr::new`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.new)
46+
- [`SocketAddr::ip`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.ip)
47+
- [`SocketAddr::port`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.port)
48+
- [`SocketAddr::is_ipv4`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.is_ipv4)
49+
- [`SocketAddr::is_ipv6`](https://doc.rust-lang.org/stable/std/net/enum.SocketAddr.html#method.is_ipv6)
50+
- [`SocketAddrV4::new`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.new)
51+
- [`SocketAddrV4::ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.ip)
52+
- [`SocketAddrV4::port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV4.html#method.port)
53+
- [`SocketAddrV6::new`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.new)
54+
- [`SocketAddrV6::ip`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.ip)
55+
- [`SocketAddrV6::port`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.port)
56+
- [`SocketAddrV6::flowinfo`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.flowinfo)
57+
- [`SocketAddrV6::scope_id`](https://doc.rust-lang.org/stable/std/net/struct.SocketAddrV6.html#method.scope_id)
58+
59+
<a id="1.69.0-Cargo"></a>
60+
61+
Cargo
62+
-----
63+
64+
- [Cargo now suggests `cargo fix` or `cargo clippy --fix` when compilation warnings are auto-fixable.](https://github.com/rust-lang/cargo/pull/11558/)
65+
- [Cargo now suggests `cargo add` if you try to install a library crate.](https://github.com/rust-lang/cargo/pull/11410/)
66+
- [Cargo now sets the `CARGO_BIN_NAME` environment variable also for binary examples.](https://github.com/rust-lang/cargo/pull/11705/)
67+
68+
<a id="1.69.0-Rustdoc"></a>
69+
70+
Rustdoc
71+
-----
72+
73+
- [Vertically compact trait bound formatting.](https://github.com/rust-lang/rust/pull/102842/)
74+
- [Only include stable lints in `rustdoc::all` group.](https://github.com/rust-lang/rust/pull/106316/)
75+
- [Compute maximum Levenshtein distance based on the query.](https://github.com/rust-lang/rust/pull/107141/)
76+
- [Remove inconsistently-present sidebar tooltips.](https://github.com/rust-lang/rust/pull/107490/)
77+
- [Search by macro when query ends with `!`.](https://github.com/rust-lang/rust/pull/108143/)
78+
79+
<a id="1.69.0-Compatibility-Notes"></a>
80+
81+
Compatibility Notes
82+
-------------------
83+
84+
- [The `rust-analysis` component from `rustup` now only contains a warning placeholder.](https://github.com/rust-lang/rust/pull/101841/) This was primarily intended for RLS, and the corresponding `-Zsave-analysis` flag has been removed from the compiler as well.
85+
- [Unaligned references to packed fields are now a hard error.](https://github.com/rust-lang/rust/pull/102513/) This has been a warning since 1.53, and denied by default with a future-compatibility warning since 1.62.
86+
- [Update the minimum external LLVM to 14.](https://github.com/rust-lang/rust/pull/107573/)
87+
- [Cargo now emits errors on invalid characters in a registry token.](https://github.com/rust-lang/cargo/pull/11600/)
88+
- [When `default-features` is set to false of a workspace dependency, and an inherited dependency of a member has `default-features = true`, Cargo will enable default features of that dependency.](https://github.com/rust-lang/cargo/pull/11409/)
89+
- [Cargo denies `CARGO_HOME` in the `[env]` configuration table. Cargo itself doesn't pick up this value, but recursive calls to cargo would, which was not intended.](https://github.com/rust-lang/cargo/pull/11644/)
90+
- [Debuginfo for build dependencies is now off if not explicitly set. This is expected to improve the overall build time.](https://github.com/rust-lang/cargo/pull/11252/)
91+
92+
<a id="1.69.0-Internal-Changes"></a>
93+
94+
Internal Changes
95+
----------------
96+
97+
These changes do not affect any public interfaces of Rust, but they represent
98+
significant improvements to the performance or internals of rustc and related
99+
tools.
100+
101+
- [Move `format_args!()` into AST (and expand it during AST lowering)](https://github.com/rust-lang/rust/pull/106745/)
102+
103+
Version 1.68.2 (2023-03-28)
104+
===========================
105+
106+
- [Update the GitHub RSA host key bundled within Cargo](https://github.com/rust-lang/cargo/pull/11883).
107+
The key was [rotated by GitHub](https://github.blog/2023-03-23-we-updated-our-rsa-ssh-host-key/)
108+
on 2023-03-24 after the old one leaked.
109+
- [Mark the old GitHub RSA host key as revoked](https://github.com/rust-lang/cargo/pull/11889).
110+
This will prevent Cargo from accepting the leaked key even when trusted by
111+
the system.
112+
- [Add support for `@revoked` and a better error message for `@cert-authority` in Cargo's SSH host key verification](https://github.com/rust-lang/cargo/pull/11635)
113+
114+
Version 1.68.1 (2023-03-23)
115+
===========================
116+
117+
- [Fix miscompilation in produced Windows MSVC artifacts](https://github.com/rust-lang/rust/pull/109094)
118+
This was introduced by enabling ThinLTO for the distributed rustc which led
119+
to miscompilations in the resulting binary. Currently this is believed to be
120+
limited to the -Zdylib-lto flag used for rustc compilation, rather than a
121+
general bug in ThinLTO, so only rustc artifacts should be affected.
122+
- [Fix --enable-local-rust builds](https://github.com/rust-lang/rust/pull/109111/)
123+
- [Treat `$prefix-clang` as `clang` in linker detection code](https://github.com/rust-lang/rust/pull/109156)
124+
- [Fix panic in compiler code](https://github.com/rust-lang/rust/pull/108162)
125+
126+
Version 1.68.0 (2023-03-09)
127+
==========================
128+
129+
<a id="1.68.0-Language"></a>
130+
131+
Language
132+
--------
133+
134+
- [Stabilize default_alloc_error_handler](https://github.com/rust-lang/rust/pull/102318/)
135+
This allows usage of `alloc` on stable without requiring the
136+
definition of a handler for allocation failure. Defining custom handlers is still unstable.
137+
- [Stabilize `efiapi` calling convention.](https://github.com/rust-lang/rust/pull/105795/)
138+
- [Remove implicit promotion for types with drop glue](https://github.com/rust-lang/rust/pull/105085/)
139+
140+
<a id="1.68.0-Compiler"></a>
141+
142+
Compiler
143+
--------
144+
145+
- [Change `bindings_with_variant_name` to deny-by-default](https://github.com/rust-lang/rust/pull/104154/)
146+
- [Allow .. to be parsed as let initializer](https://github.com/rust-lang/rust/pull/105701/)
147+
- [Add `armv7-sony-vita-newlibeabihf` as a tier 3 target](https://github.com/rust-lang/rust/pull/105712/)
148+
- [Always check alignment during compile-time const evaluation](https://github.com/rust-lang/rust/pull/104616/)
149+
- [Disable "split dwarf inlining" by default.](https://github.com/rust-lang/rust/pull/106709/)
150+
- [Add vendor to Fuchsia's target triple](https://github.com/rust-lang/rust/pull/106429/)
151+
- [Enable sanitizers for s390x-linux](https://github.com/rust-lang/rust/pull/107127/)
152+
153+
<a id="1.68.0-Libraries"></a>
154+
155+
Libraries
156+
---------
157+
158+
- [Loosen the bound on the Debug implementation of Weak.](https://github.com/rust-lang/rust/pull/90291/)
159+
- [Make `std::task::Context` !Send and !Sync](https://github.com/rust-lang/rust/pull/95985/)
160+
- [PhantomData layout guarantees](https://github.com/rust-lang/rust/pull/104081/)
161+
- [Don't derive Debug for `OnceWith` & `RepeatWith`](https://github.com/rust-lang/rust/pull/104163/)
162+
- [Implement DerefMut for PathBuf](https://github.com/rust-lang/rust/pull/105018/)
163+
- [Add O(1) `Vec -> VecDeque` conversion guarantee](https://github.com/rust-lang/rust/pull/105128/)
164+
- [Leak amplification for peek_mut() to ensure BinaryHeap's invariant is always met](https://github.com/rust-lang/rust/pull/105851/)
165+
166+
<a id="1.68.0-Stabilized-APIs"></a>
167+
168+
Stabilized APIs
169+
---------------
170+
171+
- [`{core,std}::pin::pin!`](https://doc.rust-lang.org/stable/std/pin/macro.pin.html)
172+
- [`impl From<bool> for {f32,f64}`](https://doc.rust-lang.org/stable/std/primitive.f32.html#impl-From%3Cbool%3E-for-f32)
173+
- [`std::path::MAIN_SEPARATOR_STR`](https://doc.rust-lang.org/stable/std/path/constant.MAIN_SEPARATOR_STR.html)
174+
- [`impl DerefMut for PathBuf`](https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#impl-DerefMut-for-PathBuf)
175+
176+
These APIs are now stable in const contexts:
177+
178+
- [`VecDeque::new`](https://doc.rust-lang.org/stable/std/collections/struct.VecDeque.html#method.new)
179+
180+
<a id="1.68.0-Cargo"></a>
181+
182+
Cargo
183+
-----
184+
185+
- [Stabilize sparse registry support for crates.io](https://github.com/rust-lang/cargo/pull/11224/)
186+
- [`cargo build --verbose` tells you more about why it recompiles.](https://github.com/rust-lang/cargo/pull/11407/)
187+
- [Show progress of crates.io index update even `net.git-fetch-with-cli` option enabled](https://github.com/rust-lang/cargo/pull/11579/)
188+
189+
<a id="1.68.0-Misc"></a>
190+
191+
Misc
192+
----
193+
194+
<a id="1.68.0-Compatibility-Notes"></a>
195+
196+
Compatibility Notes
197+
-------------------
198+
199+
- [Only support Android NDK 25 or newer](https://blog.rust-lang.org/2023/01/09/android-ndk-update-r25.html)
200+
- [Add `SEMICOLON_IN_EXPRESSIONS_FROM_MACROS` to future-incompat report](https://github.com/rust-lang/rust/pull/103418/)
201+
- [Only specify `--target` by default for `-Zgcc-ld=lld` on wasm](https://github.com/rust-lang/rust/pull/101792/)
202+
- [Bump `IMPLIED_BOUNDS_ENTAILMENT` to Deny + ReportNow](https://github.com/rust-lang/rust/pull/106465/)
203+
- [`std::task::Context` no longer implements Send and Sync](https://github.com/rust-lang/rust/pull/95985)
204+
205+
<a id="1.68.0-Internal-Changes"></a>
206+
207+
Internal Changes
208+
----------------
209+
210+
These changes do not affect any public interfaces of Rust, but they represent
211+
significant improvements to the performance or internals of rustc and related
212+
tools.
213+
214+
- [Encode spans relative to the enclosing item](https://github.com/rust-lang/rust/pull/84762/)
215+
- [Don't normalize in AstConv](https://github.com/rust-lang/rust/pull/101947/)
216+
- [Find the right lower bound region in the scenario of partial order relations](https://github.com/rust-lang/rust/pull/104765/)
217+
- [Fix impl block in const expr](https://github.com/rust-lang/rust/pull/104889/)
218+
- [Check ADT fields for copy implementations considering regions](https://github.com/rust-lang/rust/pull/105102/)
219+
- [rustdoc: simplify JS search routine by not messing with lev distance](https://github.com/rust-lang/rust/pull/105796/)
220+
- [Enable ThinLTO for rustc on `x86_64-pc-windows-msvc`](https://github.com/rust-lang/rust/pull/103591/)
221+
- [Enable ThinLTO for rustc on `x86_64-apple-darwin`](https://github.com/rust-lang/rust/pull/103647/)
222+
1223
Version 1.67.1 (2023-02-09)
2224
===========================
3225

@@ -29,12 +251,13 @@ Compiler
29251
- [Optimize field ordering by grouping m\*2^n-sized fields with equivalently aligned ones.](https://github.com/rust-lang/rust/pull/102750/)
30252
- [Stabilize native library modifier `verbatim`.](https://github.com/rust-lang/rust/pull/104360/)
31253

32-
Added and removed targets:
254+
Added, updated, and removed targets:
33255

34256
- [Add a tier 3 target for PowerPC on AIX](https://github.com/rust-lang/rust/pull/102293/), `powerpc64-ibm-aix`.
35257
- [Add a tier 3 target for the Sony PlayStation 1](https://github.com/rust-lang/rust/pull/102689/), `mipsel-sony-psx`.
36258
- [Add tier 3 `no_std` targets for the QNX Neutrino RTOS](https://github.com/rust-lang/rust/pull/102701/),
37259
`aarch64-unknown-nto-qnx710` and `x86_64-pc-nto-qnx710`.
260+
- [Promote UEFI targets to tier 2](https://github.com/rust-lang/rust/pull/103933/), `aarch64-unknown-uefi`, `i686-unknown-uefi`, and `x86_64-unknown-uefi`.
38261
- [Remove tier 3 `linuxkernel` targets](https://github.com/rust-lang/rust/pull/104015/) (not used by the actual kernel).
39262

40263
Refer to Rust's [platform support page][platform-support-doc]
@@ -3765,6 +3988,8 @@ Version 1.41.1 (2020-02-27)
37653988
* [Always check types of static items][69145]
37663989
* [Always check lifetime bounds of `Copy` impls][69145]
37673990
* [Fix miscompilation in callers of `Layout::repeat`][69225]
3991+
* [Rust 1.41.0 was announced as the last Rust release with tier 1 or tier 2 support for 32-bit Apple targets][apple-32bit-drop].
3992+
That announcement did not expect a patch release. 1.41.1 also includes release binaries for these targets.
37683993

37693994
[69225]: https://github.com/rust-lang/rust/issues/69225
37703995
[69145]: https://github.com/rust-lang/rust/pull/69145
@@ -3857,7 +4082,7 @@ Misc
38574082
Compatibility Notes
38584083
-------------------
38594084

3860-
- [As previously announced 1.41.0 will be the last tier 1 release for 32-bit
4085+
- [As previously announced 1.41 will be the last tier 1 release for 32-bit
38614086
Apple targets.][apple-32bit-drop] This means that the source code is still
38624087
available to build, but the targets are no longer being tested and release
38634088
binaries for those platforms will no longer be distributed by the Rust project.

compiler/rustc_const_eval/src/interpret/operand.rs

+1-8
Original file line numberDiff line numberDiff line change
@@ -612,14 +612,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
612612
span: Option<Span>,
613613
layout: Option<TyAndLayout<'tcx>>,
614614
) -> InterpResult<'tcx, OpTy<'tcx, M::Provenance>> {
615-
// FIXME(const_prop): normalization needed b/c const prop lint in
616-
// `mir_drops_elaborated_and_const_checked`, which happens before
617-
// optimized MIR. Only after optimizing the MIR can we guarantee
618-
// that the `RevealAll` pass has happened and that the body's consts
619-
// are normalized, so any call to resolve before that needs to be
620-
// manually normalized.
621-
let val = self.tcx.normalize_erasing_regions(self.param_env, *val);
622-
match val {
615+
match *val {
623616
mir::ConstantKind::Ty(ct) => {
624617
let ty = ct.ty();
625618
let valtree = self.eval_ty_constant(ct, span)?;

compiler/rustc_errors/src/lib.rs

-2
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,6 @@ pub enum StashKey {
473473
/// When an invalid lifetime e.g. `'2` should be reinterpreted
474474
/// as a char literal in the parser
475475
LifetimeIsChar,
476-
/// When an invalid lifetime e.g. `'🐱` contains emoji.
477-
LifetimeContainsEmoji,
478476
/// Maybe there was a typo where a comma was forgotten before
479477
/// FRU syntax
480478
MaybeFruTypo,

compiler/rustc_lexer/src/lib.rs

+10-33
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub enum TokenKind {
9595
Literal { kind: LiteralKind, suffix_start: u32 },
9696

9797
/// "'a"
98-
Lifetime { starts_with_number: bool, contains_emoji: bool },
98+
Lifetime { starts_with_number: bool },
9999

100100
// One-char tokens:
101101
/// ";"
@@ -632,13 +632,7 @@ impl Cursor<'_> {
632632
// If the first symbol is valid for identifier, it can be a lifetime.
633633
// Also check if it's a number for a better error reporting (so '0 will
634634
// be reported as invalid lifetime and not as unterminated char literal).
635-
// We also have to account for potential `'🐱` emojis to avoid reporting
636-
// it as an unterminated char literal.
637-
is_id_start(self.first())
638-
|| self.first().is_digit(10)
639-
// FIXME(#108019): `unic-emoji-char` seems to have data tables only up to Unicode
640-
// 5.0, but Unicode is already newer than this.
641-
|| unic_emoji_char::is_emoji(self.first())
635+
is_id_start(self.first()) || self.first().is_digit(10)
642636
};
643637

644638
if !can_be_a_lifetime {
@@ -651,33 +645,16 @@ impl Cursor<'_> {
651645
return Literal { kind, suffix_start };
652646
}
653647

654-
// Either a lifetime or a character literal.
648+
// Either a lifetime or a character literal with
649+
// length greater than 1.
655650

656651
let starts_with_number = self.first().is_digit(10);
657-
let mut contains_emoji = false;
658652

659-
// FIXME(#108019): `unic-emoji-char` seems to have data tables only up to Unicode
660-
// 5.0, but Unicode is already newer than this.
661-
if unic_emoji_char::is_emoji(self.first()) {
662-
contains_emoji = true;
663-
} else {
664-
// Skip the literal contents.
665-
// First symbol can be a number (which isn't a valid identifier start),
666-
// so skip it without any checks.
667-
self.bump();
668-
}
669-
self.eat_while(|c| {
670-
if is_id_continue(c) {
671-
true
672-
// FIXME(#108019): `unic-emoji-char` seems to have data tables only up to Unicode
673-
// 5.0, but Unicode is already newer than this.
674-
} else if unic_emoji_char::is_emoji(c) {
675-
contains_emoji = true;
676-
true
677-
} else {
678-
false
679-
}
680-
});
653+
// Skip the literal contents.
654+
// First symbol can be a number (which isn't a valid identifier start),
655+
// so skip it without any checks.
656+
self.bump();
657+
self.eat_while(is_id_continue);
681658

682659
// Check if after skipping literal contents we've met a closing
683660
// single quote (which means that user attempted to create a
@@ -687,7 +664,7 @@ impl Cursor<'_> {
687664
let kind = Char { terminated: true };
688665
Literal { kind, suffix_start: self.pos_within_token() }
689666
} else {
690-
Lifetime { starts_with_number, contains_emoji }
667+
Lifetime { starts_with_number }
691668
}
692669
}
693670

compiler/rustc_lexer/src/tests.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ fn lifetime() {
235235
check_lexing(
236236
"'abc",
237237
expect![[r#"
238-
Token { kind: Lifetime { starts_with_number: false, contains_emoji: false }, len: 4 }
238+
Token { kind: Lifetime { starts_with_number: false }, len: 4 }
239239
"#]],
240240
);
241241
}

compiler/rustc_middle/src/ty/normalize_erasing_regions.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -193,9 +193,9 @@ impl<'tcx> NormalizeAfterErasingRegionsFolder<'tcx> {
193193
let arg = self.param_env.and(arg);
194194

195195
self.tcx.try_normalize_generic_arg_after_erasing_regions(arg).unwrap_or_else(|_| bug!(
196-
"Failed to normalize {:?}, maybe try to call `try_normalize_erasing_regions` instead",
197-
arg.value
198-
))
196+
"Failed to normalize {:?}, maybe try to call `try_normalize_erasing_regions` instead",
197+
arg.value
198+
))
199199
}
200200
}
201201

0 commit comments

Comments
 (0)