Skip to content

Commit 3982d35

Browse files
committed
Auto merge of #67505 - Centril:rollup-7win7ty, r=Centril
Rollup of 6 pull requests Successful merges: - #67148 ( Refactor type & bounds parsing thoroughly) - #67410 (Reenable static linking of libstdc++ on windows-gnu) - #67439 (Cleanup `lower_pattern_unadjusted` & Improve slice pat typeck) - #67480 (Require issue = "none" over issue = "0" in unstable attributes) - #67500 (Tweak non_shorthand_field_patterns' suggestion) - #67504 (Warn against relying on ?Sized being last) Failed merges: r? @ghost
2 parents 005cf38 + ca528fc commit 3982d35

File tree

133 files changed

+985
-856
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+985
-856
lines changed

src/bootstrap/compile.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ pub fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo, target: Interne
563563
// not for MSVC or macOS
564564
if builder.config.llvm_static_stdcpp &&
565565
!target.contains("freebsd") &&
566-
!target.contains("windows") &&
566+
!target.contains("msvc") &&
567567
!target.contains("apple") {
568568
let file = compiler_file(builder,
569569
builder.cxx(target).unwrap(),

src/liballoc/boxed.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ impl<T: ?Sized> Box<T> {
476476
Box::into_unique(b).into()
477477
}
478478

479-
#[unstable(feature = "ptr_internals", issue = "0", reason = "use into_raw_non_null instead")]
479+
#[unstable(feature = "ptr_internals", issue = "none", reason = "use into_raw_non_null instead")]
480480
#[inline]
481481
#[doc(hidden)]
482482
pub fn into_unique(b: Box<T>) -> Unique<T> {
@@ -830,7 +830,7 @@ impl From<Box<str>> for Box<[u8]> {
830830
}
831831
}
832832

833-
#[unstable(feature = "boxed_slice_try_from", issue = "0")]
833+
#[unstable(feature = "boxed_slice_try_from", issue = "none")]
834834
impl<T, const N: usize> TryFrom<Box<[T]>> for Box<[T; N]>
835835
where
836836
[T; N]: LengthAtMost32,
@@ -946,7 +946,7 @@ impl<T: ?Sized> DerefMut for Box<T> {
946946
}
947947
}
948948

949-
#[unstable(feature = "receiver_trait", issue = "0")]
949+
#[unstable(feature = "receiver_trait", issue = "none")]
950950
impl<T: ?Sized> Receiver for Box<T> {}
951951

952952
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1040,7 +1040,7 @@ impl<A, F: Fn<A> + ?Sized> Fn<A> for Box<F> {
10401040
#[unstable(feature = "coerce_unsized", issue = "27732")]
10411041
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Box<U>> for Box<T> {}
10421042

1043-
#[unstable(feature = "dispatch_from_dyn", issue = "0")]
1043+
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
10441044
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Box<U>> for Box<T> {}
10451045

10461046
#[stable(feature = "boxed_slice_from_iter", since = "1.32.0")]

src/liballoc/collections/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pub enum TryReserveError {
5757
layout: Layout,
5858

5959
#[doc(hidden)]
60-
#[unstable(feature = "container_error_extra", issue = "0", reason = "\
60+
#[unstable(feature = "container_error_extra", issue = "none", reason = "\
6161
Enable exposing the allocator’s custom error value \
6262
if an associated type is added in the future: \
6363
https://github.com/rust-lang/wg-allocators/issues/23")]

src/liballoc/fmt.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@
514514
515515
#![stable(feature = "rust1", since = "1.0.0")]
516516

517-
#[unstable(feature = "fmt_internals", issue = "0")]
517+
#[unstable(feature = "fmt_internals", issue = "none")]
518518
pub use core::fmt::rt;
519519
#[stable(feature = "fmt_flags_align", since = "1.28.0")]
520520
pub use core::fmt::Alignment;

src/liballoc/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ mod std {
171171
}
172172

173173
#[doc(hidden)]
174-
#[unstable(feature = "liballoc_internals", issue = "0", reason = "implementation detail")]
174+
#[unstable(feature = "liballoc_internals", issue = "none", reason = "implementation detail")]
175175
pub mod __export {
176176
pub use core::format_args;
177177
}

src/liballoc/raw_vec.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "0")]
1+
#![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "none")]
22
#![doc(hidden)]
33

44
use core::cmp;

src/liballoc/rc.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ impl<T: ?Sized> !marker::Sync for Rc<T> {}
291291
#[unstable(feature = "coerce_unsized", issue = "27732")]
292292
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Rc<U>> for Rc<T> {}
293293

294-
#[unstable(feature = "dispatch_from_dyn", issue = "0")]
294+
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
295295
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Rc<U>> for Rc<T> {}
296296

297297
impl<T: ?Sized> Rc<T> {
@@ -1090,7 +1090,7 @@ impl<T: ?Sized> Deref for Rc<T> {
10901090
}
10911091
}
10921092

1093-
#[unstable(feature = "receiver_trait", issue = "0")]
1093+
#[unstable(feature = "receiver_trait", issue = "none")]
10941094
impl<T: ?Sized> Receiver for Rc<T> {}
10951095

10961096
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1471,7 +1471,7 @@ impl<T> From<Vec<T>> for Rc<[T]> {
14711471
}
14721472
}
14731473

1474-
#[unstable(feature = "boxed_slice_try_from", issue = "0")]
1474+
#[unstable(feature = "boxed_slice_try_from", issue = "none")]
14751475
impl<T, const N: usize> TryFrom<Rc<[T]>> for Rc<[T; N]>
14761476
where
14771477
[T; N]: LengthAtMost32,
@@ -1621,7 +1621,7 @@ impl<T: ?Sized> !marker::Sync for Weak<T> {}
16211621
#[unstable(feature = "coerce_unsized", issue = "27732")]
16221622
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
16231623

1624-
#[unstable(feature = "dispatch_from_dyn", issue = "0")]
1624+
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
16251625
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Weak<U>> for Weak<T> {}
16261626

16271627
impl<T> Weak<T> {
@@ -2106,6 +2106,8 @@ impl<T: ?Sized> Unpin for Rc<T> { }
21062106
unsafe fn data_offset<T: ?Sized>(ptr: *const T) -> isize {
21072107
// Align the unsized value to the end of the `RcBox`.
21082108
// Because it is ?Sized, it will always be the last field in memory.
2109+
// Note: This is a detail of the current implementation of the compiler,
2110+
// and is not a guaranteed language detail. Do not rely on it outside of std.
21092111
data_offset_align(align_of_val(&*ptr))
21102112
}
21112113

src/liballoc/sync.rs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ unsafe impl<T: ?Sized + Sync + Send> Sync for Arc<T> {}
206206
#[unstable(feature = "coerce_unsized", issue = "27732")]
207207
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {}
208208

209-
#[unstable(feature = "dispatch_from_dyn", issue = "0")]
209+
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
210210
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Arc<U>> for Arc<T> {}
211211

212212
impl<T: ?Sized> Arc<T> {
@@ -263,7 +263,7 @@ unsafe impl<T: ?Sized + Sync + Send> Sync for Weak<T> {}
263263

264264
#[unstable(feature = "coerce_unsized", issue = "27732")]
265265
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
266-
#[unstable(feature = "dispatch_from_dyn", issue = "0")]
266+
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
267267
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Weak<U>> for Weak<T> {}
268268

269269
#[stable(feature = "arc_weak", since = "1.4.0")]
@@ -993,7 +993,7 @@ impl<T: ?Sized> Deref for Arc<T> {
993993
}
994994
}
995995

996-
#[unstable(feature = "receiver_trait", issue = "0")]
996+
#[unstable(feature = "receiver_trait", issue = "none")]
997997
impl<T: ?Sized> Receiver for Arc<T> {}
998998

999999
impl<T: Clone> Arc<T> {
@@ -2032,7 +2032,7 @@ impl<T> From<Vec<T>> for Arc<[T]> {
20322032
}
20332033
}
20342034

2035-
#[unstable(feature = "boxed_slice_try_from", issue = "0")]
2035+
#[unstable(feature = "boxed_slice_try_from", issue = "none")]
20362036
impl<T, const N: usize> TryFrom<Arc<[T]>> for Arc<[T; N]>
20372037
where
20382038
[T; N]: LengthAtMost32,
@@ -2161,6 +2161,8 @@ impl<T: ?Sized> Unpin for Arc<T> { }
21612161
unsafe fn data_offset<T: ?Sized>(ptr: *const T) -> isize {
21622162
// Align the unsized value to the end of the `ArcInner`.
21632163
// Because it is `?Sized`, it will always be the last field in memory.
2164+
// Note: This is a detail of the current implementation of the compiler,
2165+
// and is not a guaranteed language detail. Do not rely on it outside of std.
21642166
data_offset_align(align_of_val(&*ptr))
21652167
}
21662168

src/libcore/array/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ impl TryFromSliceError {
7474
#[unstable(feature = "array_error_internals",
7575
reason = "available through Error trait and this method should not \
7676
be exposed publicly",
77-
issue = "0")]
77+
issue = "none")]
7878
#[inline]
7979
#[doc(hidden)]
8080
pub fn __description(&self) -> &str {
@@ -388,14 +388,14 @@ where
388388
#[rustc_on_unimplemented(
389389
message="arrays only have std trait implementations for lengths 0..=32",
390390
)]
391-
#[unstable(feature = "const_generic_impls_guard", issue = "0",
391+
#[unstable(feature = "const_generic_impls_guard", issue = "none",
392392
reason = "will never be stable, just a temporary step until const generics are stable")]
393393
pub trait LengthAtMost32 {}
394394

395395
macro_rules! array_impls {
396396
($($N:literal)+) => {
397397
$(
398-
#[unstable(feature = "const_generic_impls_guard", issue = "0")]
398+
#[unstable(feature = "const_generic_impls_guard", issue = "none")]
399399
impl<T> LengthAtMost32 for [T; $N] {}
400400
)+
401401
}

src/libcore/char/convert.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ impl ParseCharError {
169169
#[unstable(
170170
feature = "char_error_internals",
171171
reason = "this method should not be available publicly",
172-
issue = "0"
172+
issue = "none"
173173
)]
174174
#[doc(hidden)]
175175
pub fn __description(&self) -> &str {

0 commit comments

Comments
 (0)