Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4b91a6e

Browse files
committed
Auto merge of #100273 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum
[stable] 1.63.0 release Includes cherry picks of: * #100207 * rust-lang/rust-clippy#9302 * Avoid ICE in rustdoc when using Fn bounds #100205 r? `@Mark-Simulacrum`
2 parents 6f955bf + 7ddc9b7 commit 4b91a6e

File tree

12 files changed

+322
-38
lines changed

12 files changed

+322
-38
lines changed

‎RELEASES.md

Lines changed: 210 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,215 @@
1+
Version 1.63.0 (2022年08月11日)
2+
==========================
3+
4+
Language
5+
--------
6+
- [Remove migrate borrowck mode for pre-NLL errors.][95565]
7+
- [Modify MIR building to drop repeat expressions with length zero.][95953]
8+
- [Remove label/lifetime shadowing warnings.][96296]
9+
- [Allow explicit generic arguments in the presence of `impl Trait` args.][96868]
10+
- [Make `cenum_impl_drop_cast` warnings deny-by-default.][97652]
11+
- [Prevent unwinding when `-C panic=abort` is used regardless of declared ABI.][96959]
12+
- [lub: don't bail out due to empty binders.][97867]
13+
14+
Compiler
15+
--------
16+
- [Stabilize the `bundle` native library modifier,][95818] also removing the
17+
deprecated `static-nobundle` linking kind.
18+
- [Add Apple WatchOS compile targets\*.][95243]
19+
- [Add a Windows application manifest to rustc-main.][96737]
20+
21+
\* Refer to Rust's [platform support page][platform-support-doc] for more
22+
information on Rust's tiered platform support.
23+
24+
Libraries
25+
---------
26+
- [Implement `Copy`, `Clone`, `PartialEq` and `Eq` for `core::fmt::Alignment`.][94530]
27+
- [Extend `ptr::null` and `null_mut` to all thin (including extern) types.][94954]
28+
- [`impl Read and Write for VecDeque<u8>`.][95632]
29+
- [STD support for the Nintendo 3DS.][95897]
30+
- [Make write/print macros eagerly drop temporaries.][96455]
31+
- [Implement internal traits that enable `[OsStr]::join`.][96881]
32+
- [Implement `Hash` for `core::alloc::Layout`.][97034]
33+
- [Add capacity documentation for `OsString`.][97202]
34+
- [Put a bound on collection misbehavior.][97316]
35+
- [Make `std::mem::needs_drop` accept `?Sized`.][97675]
36+
- [`impl Termination for Infallible` and then make the `Result` impls of `Termination` more generic.][97803]
37+
- [Document Rust's stance on `/proc/self/mem`.][97837]
38+
39+
Stabilized APIs
40+
---------------
41+
42+
- [`array::from_fn`]
43+
- [`Box::into_pin`]
44+
- [`BinaryHeap::try_reserve`]
45+
- [`BinaryHeap::try_reserve_exact`]
46+
- [`OsString::try_reserve`]
47+
- [`OsString::try_reserve_exact`]
48+
- [`PathBuf::try_reserve`]
49+
- [`PathBuf::try_reserve_exact`]
50+
- [`Path::try_exists`]
51+
- [`Ref::filter_map`]
52+
- [`RefMut::filter_map`]
53+
- [`NonNull::<[T]>::len`][`NonNull::<slice>::len`]
54+
- [`ToOwned::clone_into`]
55+
- [`Ipv6Addr::to_ipv4_mapped`]
56+
- [`unix::io::AsFd`]
57+
- [`unix::io::BorrowedFd<'fd>`]
58+
- [`unix::io::OwnedFd`]
59+
- [`windows::io::AsHandle`]
60+
- [`windows::io::BorrowedHandle<'handle>`]
61+
- [`windows::io::OwnedHandle`]
62+
- [`windows::io::HandleOrInvalid`]
63+
- [`windows::io::HandleOrNull`]
64+
- [`windows::io::InvalidHandleError`]
65+
- [`windows::io::NullHandleError`]
66+
- [`windows::io::AsSocket`]
67+
- [`windows::io::BorrowedSocket<'handle>`]
68+
- [`windows::io::OwnedSocket`]
69+
- [`thread::scope`]
70+
- [`thread::Scope`]
71+
- [`thread::ScopedJoinHandle`]
72+
73+
These APIs are now usable in const contexts:
74+
75+
- [`array::from_ref`]
76+
- [`slice::from_ref`]
77+
- [`intrinsics::copy`]
78+
- [`intrinsics::copy_nonoverlapping`]
79+
- [`<*const T>::copy_to`]
80+
- [`<*const T>::copy_to_nonoverlapping`]
81+
- [`<*mut T>::copy_to`]
82+
- [`<*mut T>::copy_to_nonoverlapping`]
83+
- [`<*mut T>::copy_from`]
84+
- [`<*mut T>::copy_from_nonoverlapping`]
85+
- [`str::from_utf8`]
86+
- [`Utf8Error::error_len`]
87+
- [`Utf8Error::valid_up_to`]
88+
- [`Condvar::new`]
89+
- [`Mutex::new`]
90+
- [`RwLock::new`]
91+
92+
Cargo
93+
-----
94+
- [Stabilize the `--config path` command-line argument.][cargo/10755]
95+
- [Expose rust-version in the environment as `CARGO_PKG_RUST_VERSION`.][cargo/10713]
96+
97+
Compatibility Notes
98+
-------------------
99+
100+
- [`#[link]` attributes are now checked more strictly,][96885] which may introduce
101+
errors for invalid attribute arguments that were previously ignored.
102+
103+
Internal Changes
104+
----------------
105+
106+
These changes provide no direct user facing benefits, but represent significant
107+
improvements to the internals and overall performance of rustc
108+
and related tools.
109+
110+
- [Prepare Rust for LLVM opaque pointers.][94214]
111+
112+
[94214]: https://github.com/rust-lang/rust/pull/94214/
113+
[94530]: https://github.com/rust-lang/rust/pull/94530/
114+
[94954]: https://github.com/rust-lang/rust/pull/94954/
115+
[95243]: https://github.com/rust-lang/rust/pull/95243/
116+
[95565]: https://github.com/rust-lang/rust/pull/95565/
117+
[95632]: https://github.com/rust-lang/rust/pull/95632/
118+
[95818]: https://github.com/rust-lang/rust/pull/95818/
119+
[95897]: https://github.com/rust-lang/rust/pull/95897/
120+
[95953]: https://github.com/rust-lang/rust/pull/95953/
121+
[96296]: https://github.com/rust-lang/rust/pull/96296/
122+
[96455]: https://github.com/rust-lang/rust/pull/96455/
123+
[96737]: https://github.com/rust-lang/rust/pull/96737/
124+
[96868]: https://github.com/rust-lang/rust/pull/96868/
125+
[96881]: https://github.com/rust-lang/rust/pull/96881/
126+
[96885]: https://github.com/rust-lang/rust/pull/96885/
127+
[96959]: https://github.com/rust-lang/rust/pull/96959/
128+
[97034]: https://github.com/rust-lang/rust/pull/97034/
129+
[97202]: https://github.com/rust-lang/rust/pull/97202/
130+
[97316]: https://github.com/rust-lang/rust/pull/97316/
131+
[97652]: https://github.com/rust-lang/rust/pull/97652/
132+
[97675]: https://github.com/rust-lang/rust/pull/97675/
133+
[97803]: https://github.com/rust-lang/rust/pull/97803/
134+
[97837]: https://github.com/rust-lang/rust/pull/97837/
135+
[97867]: https://github.com/rust-lang/rust/pull/97867/
136+
[cargo/10713]: https://github.com/rust-lang/cargo/pull/10713/
137+
[cargo/10755]: https://github.com/rust-lang/cargo/pull/10755/
138+
139+
[`array::from_fn`]: https://doc.rust-lang.org/stable/std/array/fn.from_fn.html
140+
[`Box::into_pin`]: https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#method.into_pin
141+
[`BinaryHeap::try_reserve_exact`]: https://doc.rust-lang.org/stable/alloc/collections/binary_heap/struct.BinaryHeap.html#method.try_reserve_exact
142+
[`BinaryHeap::try_reserve`]: https://doc.rust-lang.org/stable/std/collections/struct.BinaryHeap.html#method.try_reserve
143+
[`OsString::try_reserve`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.try_reserve
144+
[`OsString::try_reserve_exact`]: https://doc.rust-lang.org/stable/std/ffi/struct.OsString.html#method.try_reserve_exact
145+
[`PathBuf::try_reserve`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.try_reserve
146+
[`PathBuf::try_reserve_exact`]: https://doc.rust-lang.org/stable/std/path/struct.PathBuf.html#method.try_reserve_exact
147+
[`Path::try_exists`]: https://doc.rust-lang.org/stable/std/path/struct.Path.html#method.try_exists
148+
[`Ref::filter_map`]: https://doc.rust-lang.org/stable/std/cell/struct.Ref.html#method.filter_map
149+
[`RefMut::filter_map`]: https://doc.rust-lang.org/stable/std/cell/struct.RefMut.html#method.filter_map
150+
[`NonNull::<slice>::len`]: https://doc.rust-lang.org/stable/std/ptr/struct.NonNull.html#method.len
151+
[`ToOwned::clone_into`]: https://doc.rust-lang.org/stable/std/borrow/trait.ToOwned.html#method.clone_into
152+
[`Ipv6Addr::to_ipv4_mapped`]: https://doc.rust-lang.org/stable/std/net/struct.Ipv6Addr.html#method.to_ipv4_mapped
153+
[`unix::io::AsFd`]: https://doc.rust-lang.org/stable/std/os/unix/io/trait.AsFd.html
154+
[`unix::io::BorrowedFd<'fd>`]: https://doc.rust-lang.org/stable/std/os/unix/io/struct.BorrowedFd.html
155+
[`unix::io::OwnedFd`]: https://doc.rust-lang.org/stable/std/os/unix/io/struct.OwnedFd.html
156+
[`windows::io::AsHandle`]: https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsHandle.html
157+
[`windows::io::BorrowedHandle<'handle>`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.BorrowedHandle.html
158+
[`windows::io::OwnedHandle`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.OwnedHandle.html
159+
[`windows::io::HandleOrInvalid`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.HandleOrInvalid.html
160+
[`windows::io::HandleOrNull`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.HandleOrNull.html
161+
[`windows::io::InvalidHandleError`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.InvalidHandleError.html
162+
[`windows::io::NullHandleError`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.NullHandleError.html
163+
[`windows::io::AsSocket`]: https://doc.rust-lang.org/stable/std/os/windows/io/trait.AsSocket.html
164+
[`windows::io::BorrowedSocket<'handle>`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.BorrowedSocket.html
165+
[`windows::io::OwnedSocket`]: https://doc.rust-lang.org/stable/std/os/windows/io/struct.OwnedSocket.html
166+
[`thread::scope`]: https://doc.rust-lang.org/stable/std/thread/fn.scope.html
167+
[`thread::Scope`]: https://doc.rust-lang.org/stable/std/thread/struct.Scope.html
168+
[`thread::ScopedJoinHandle`]: https://doc.rust-lang.org/stable/std/thread/struct.ScopedJoinHandle.html
169+
170+
[`array::from_ref`]: https://doc.rust-lang.org/stable/std/array/fn.from_ref.html
171+
[`slice::from_ref`]: https://doc.rust-lang.org/stable/std/slice/fn.from_ref.html
172+
[`intrinsics::copy`]: https://doc.rust-lang.org/stable/std/intrinsics/fn.copy.html
173+
[`intrinsics::copy_nonoverlapping`]: https://doc.rust-lang.org/stable/std/intrinsics/fn.copy_nonoverlapping.html
174+
[`<*const T>::copy_to`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to
175+
[`<*const T>::copy_to_nonoverlapping`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to_nonoverlapping
176+
[`<*mut T>::copy_to`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to-1
177+
[`<*mut T>::copy_to_nonoverlapping`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_to_nonoverlapping-1
178+
[`<*mut T>::copy_from`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_from
179+
[`<*mut T>::copy_from_nonoverlapping`]: https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.copy_from_nonoverlapping
180+
[`str::from_utf8`]: https://doc.rust-lang.org/stable/std/str/fn.from_utf8.html
181+
[`Utf8Error::error_len`]: https://doc.rust-lang.org/stable/std/str/struct.Utf8Error.html#method.error_len
182+
[`Utf8Error::valid_up_to`]: https://doc.rust-lang.org/stable/std/str/struct.Utf8Error.html#method.valid_up_to
183+
[`Condvar::new`]: https://doc.rust-lang.org/stable/std/sync/struct.Condvar.html#method.new
184+
[`Mutex::new`]: https://doc.rust-lang.org/stable/std/sync/struct.Mutex.html#method.new
185+
[`RwLock::new`]: https://doc.rust-lang.org/stable/std/sync/struct.RwLock.html#method.new
186+
187+
Version 1.62.1 (2022年07月19日)
188+
==========================
189+
190+
Rust 1.62.1 addresses a few recent regressions in the compiler and standard
191+
library, and also mitigates a CPU vulnerability on Intel SGX.
192+
193+
* [The compiler fixed unsound function coercions involving `impl Trait` return types.][98608]
194+
* [The compiler fixed an incremental compilation bug with `async fn` lifetimes.][98890]
195+
* [Windows added a fallback for overlapped I/O in synchronous reads and writes.][98950]
196+
* [The `x86_64-fortanix-unknown-sgx` target added a mitigation for the
197+
MMIO stale data vulnerability][98126], advisory [INTEL-SA-00615].
198+
199+
[98608]: https://github.com/rust-lang/rust/issues/98608
200+
[98890]: https://github.com/rust-lang/rust/issues/98890
201+
[98950]: https://github.com/rust-lang/rust/pull/98950
202+
[98126]: https://github.com/rust-lang/rust/pull/98126
203+
[INTEL-SA-00615]: https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00615.html
204+
1205
Version 1.62.0 (2022年06月30日)
2206
==========================
3207

4208
Language
5209
--------
6210

7211
- [Stabilize `#[derive(Default)]` on enums with a `#[default]` variant][94457]
8-
- [Stop validating some checks in dead code after functions with uninhabited return types][93313]
212+
- [Teach flow sensitive checks that visibly uninhabited call expressions never return][93313]
9213
- [Fix constants not getting dropped if part of a diverging expression][94775]
10214
- [Support unit struct/enum variant in destructuring assignment][95380]
11215
- [Remove mutable_borrow_reservation_conflict lint and allow the code pattern][96268]
@@ -29,7 +233,6 @@ Compiler
29233
Libraries
30234
---------
31235

32-
- [Move `CStr` to libcore, and `CString` to liballoc][94079]
33236
- [Windows: Use a pipe relay for chaining pipes][95841]
34237
- [Replace Linux Mutex and Condvar with futex based ones.][95035]
35238
- [Replace RwLock by a futex based one on Linux][95801]
@@ -76,8 +279,11 @@ Compatibility Notes
76279
- `cargo test` now passes `--target` to `rustdoc` if the specified target is
77280
the same as the host target.
78281
[#10594](https://github.com/rust-lang/cargo/pull/10594)
282+
- [rustdoc: doctests are now run on unexported `macro_rules!` macros, matching other private items][96630]
79283
- [rustdoc: Remove .woff font files][96279]
80284
- [Enforce Copy bounds for repeat elements while considering lifetimes][95819]
285+
- [Windows: Fix potentinal unsoundness by aborting if `File` reads or writes cannot
286+
complete synchronously][95469].
81287

82288
Internal Changes
83289
----------------
@@ -90,7 +296,6 @@ and related tools.
90296

91297
[93313]: https://github.com/rust-lang/rust/pull/93313/
92298
[93969]: https://github.com/rust-lang/rust/pull/93969/
93-
[94079]: https://github.com/rust-lang/rust/pull/94079/
94299
[94206]: https://github.com/rust-lang/rust/pull/94206/
95300
[94457]: https://github.com/rust-lang/rust/pull/94457/
96301
[94775]: https://github.com/rust-lang/rust/pull/94775/
@@ -100,6 +305,7 @@ and related tools.
100305
[95372]: https://github.com/rust-lang/rust/pull/95372/
101306
[95380]: https://github.com/rust-lang/rust/pull/95380/
102307
[95431]: https://github.com/rust-lang/rust/pull/95431/
308+
[95469]: https://github.com/rust-lang/rust/pull/95469/
103309
[95705]: https://github.com/rust-lang/rust/pull/95705/
104310
[95801]: https://github.com/rust-lang/rust/pull/95801/
105311
[95819]: https://github.com/rust-lang/rust/pull/95819/
@@ -111,6 +317,7 @@ and related tools.
111317
[96393]: https://github.com/rust-lang/rust/pull/96393/
112318
[96436]: https://github.com/rust-lang/rust/pull/96436/
113319
[96557]: https://github.com/rust-lang/rust/pull/96557/
320+
[96630]: https://github.com/rust-lang/rust/pull/96630/
114321

115322
[`bool::then_some`]: https://doc.rust-lang.org/stable/std/primitive.bool.html#method.then_some
116323
[`f32::total_cmp`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.total_cmp

‎src/ci/channel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
beta
1+
stable

‎src/librustdoc/clean/auto_trait.rs

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -345,15 +345,13 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
345345
fn make_final_bounds(
346346
&self,
347347
ty_to_bounds: FxHashMap<Type, FxHashSet<GenericBound>>,
348-
ty_to_fn: FxHashMap<Type, (Option<PolyTrait>, Option<Type>)>,
348+
ty_to_fn: FxHashMap<Type, (PolyTrait, Option<Type>)>,
349349
lifetime_to_bounds: FxHashMap<Lifetime, FxHashSet<GenericBound>>,
350350
) -> Vec<WherePredicate> {
351351
ty_to_bounds
352352
.into_iter()
353353
.flat_map(|(ty, mut bounds)| {
354-
if let Some(data) = ty_to_fn.get(&ty) {
355-
let (poly_trait, output) =
356-
(data.0.as_ref().unwrap().clone(), data.1.as_ref().cloned().map(Box::new));
354+
if let Some((ref poly_trait, ref output)) = ty_to_fn.get(&ty) {
357355
let mut new_path = poly_trait.trait_.clone();
358356
let last_segment = new_path.segments.pop().expect("segments were empty");
359357

@@ -371,8 +369,9 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
371369
GenericArgs::Parenthesized { inputs, output } => (inputs, output),
372370
};
373371

372+
let output = output.as_ref().cloned().map(Box::new);
374373
if old_output.is_some() && old_output != output {
375-
panic!("Output mismatch for {:?} {:?} {:?}", ty, old_output, data.1);
374+
panic!("Output mismatch for {:?} {:?} {:?}", ty, old_output, output);
376375
}
377376

378377
let new_params = GenericArgs::Parenthesized { inputs: old_input, output };
@@ -382,7 +381,10 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
382381
.push(PathSegment { name: last_segment.name, args: new_params });
383382

384383
bounds.insert(GenericBound::TraitBound(
385-
PolyTrait { trait_: new_path, generic_params: poly_trait.generic_params },
384+
PolyTrait {
385+
trait_: new_path,
386+
generic_params: poly_trait.generic_params.clone(),
387+
},
386388
hir::TraitBoundModifier::None,
387389
));
388390
}
@@ -468,7 +470,7 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
468470
let mut lifetime_to_bounds: FxHashMap<_, FxHashSet<_>> = Default::default();
469471
let mut ty_to_traits: FxHashMap<Type, FxHashSet<Path>> = Default::default();
470472

471-
let mut ty_to_fn: FxHashMap<Type, (Option<PolyTrait>, Option<Type>)> = Default::default();
473+
let mut ty_to_fn: FxHashMap<Type, (PolyTrait, Option<Type>)> = Default::default();
472474

473475
for p in clean_where_predicates {
474476
let (orig_p, p) = (p, p.clean(self.cx));
@@ -532,8 +534,8 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
532534
if is_fn {
533535
ty_to_fn
534536
.entry(ty.clone())
535-
.and_modify(|e| *e = (Some(poly_trait.clone()), e.1.clone()))
536-
.or_insert(((Some(poly_trait.clone())), None));
537+
.and_modify(|e| *e = (poly_trait.clone(), e.1.clone()))
538+
.or_insert(((poly_trait.clone()), None));
537539

538540
ty_to_bounds.entry(ty.clone()).or_default();
539541
} else {
@@ -556,7 +558,13 @@ impl<'a, 'tcx> AutoTraitFinder<'a, 'tcx> {
556558
.and_modify(|e| {
557559
*e = (e.0.clone(), Some(rhs.ty().unwrap().clone()))
558560
})
559-
.or_insert((None, Some(rhs.ty().unwrap().clone())));
561+
.or_insert((
562+
PolyTrait {
563+
trait_: trait_.clone(),
564+
generic_params: Vec::new(),
565+
},
566+
Some(rhs.ty().unwrap().clone()),
567+
));
560568
continue;
561569
}
562570

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /