Skip to content

Commit

Permalink
Auto merge of #67505 - Centril:rollup-7win7ty, r=Centril
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Dec 22, 2019
2 parents 005cf38 + ca528fc commit 3982d35
Show file tree
Hide file tree
Showing 133 changed files with 985 additions and 856 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ pub fn rustc_cargo_env(builder: &Builder<'_>, cargo: &mut Cargo, target: Interne
// not for MSVC or macOS
if builder.config.llvm_static_stdcpp &&
!target.contains("freebsd") &&
!target.contains("windows") &&
!target.contains("msvc") &&
!target.contains("apple") {
let file = compiler_file(builder,
builder.cxx(target).unwrap(),
Expand Down
8 changes: 4 additions & 4 deletions src/liballoc/boxed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ impl<T: ?Sized> Box<T> {
Box::into_unique(b).into()
}

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

#[unstable(feature = "boxed_slice_try_from", issue = "0")]
#[unstable(feature = "boxed_slice_try_from", issue = "none")]
impl<T, const N: usize> TryFrom<Box<[T]>> for Box<[T; N]>
where
[T; N]: LengthAtMost32,
Expand Down Expand Up @@ -946,7 +946,7 @@ impl<T: ?Sized> DerefMut for Box<T> {
}
}

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

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

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

#[stable(feature = "boxed_slice_from_iter", since = "1.32.0")]
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/collections/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ pub enum TryReserveError {
layout: Layout,

#[doc(hidden)]
#[unstable(feature = "container_error_extra", issue = "0", reason = "\
#[unstable(feature = "container_error_extra", issue = "none", reason = "\
Enable exposing the allocator’s custom error value \
if an associated type is added in the future: \
https://github.com/rust-lang/wg-allocators/issues/23")]
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/fmt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@

#![stable(feature = "rust1", since = "1.0.0")]

#[unstable(feature = "fmt_internals", issue = "0")]
#[unstable(feature = "fmt_internals", issue = "none")]
pub use core::fmt::rt;
#[stable(feature = "fmt_flags_align", since = "1.28.0")]
pub use core::fmt::Alignment;
Expand Down
2 changes: 1 addition & 1 deletion src/liballoc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ mod std {
}

#[doc(hidden)]
#[unstable(feature = "liballoc_internals", issue = "0", reason = "implementation detail")]
#[unstable(feature = "liballoc_internals", issue = "none", reason = "implementation detail")]
pub mod __export {
pub use core::format_args;
}
2 changes: 1 addition & 1 deletion src/liballoc/raw_vec.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "0")]
#![unstable(feature = "raw_vec_internals", reason = "implementation detail", issue = "none")]
#![doc(hidden)]

use core::cmp;
Expand Down
10 changes: 6 additions & 4 deletions src/liballoc/rc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ impl<T: ?Sized> !marker::Sync for Rc<T> {}
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Rc<U>> for Rc<T> {}

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

impl<T: ?Sized> Rc<T> {
Expand Down Expand Up @@ -1090,7 +1090,7 @@ impl<T: ?Sized> Deref for Rc<T> {
}
}

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

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

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

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

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

Expand Down
10 changes: 6 additions & 4 deletions src/liballoc/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ unsafe impl<T: ?Sized + Sync + Send> Sync for Arc<T> {}
#[unstable(feature = "coerce_unsized", issue = "27732")]
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {}

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

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

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

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

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

impl<T: Clone> Arc<T> {
Expand Down Expand Up @@ -2032,7 +2032,7 @@ impl<T> From<Vec<T>> for Arc<[T]> {
}
}

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

Expand Down
6 changes: 3 additions & 3 deletions src/libcore/array/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ impl TryFromSliceError {
#[unstable(feature = "array_error_internals",
reason = "available through Error trait and this method should not \
be exposed publicly",
issue = "0")]
issue = "none")]
#[inline]
#[doc(hidden)]
pub fn __description(&self) -> &str {
Expand Down Expand Up @@ -388,14 +388,14 @@ where
#[rustc_on_unimplemented(
message="arrays only have std trait implementations for lengths 0..=32",
)]
#[unstable(feature = "const_generic_impls_guard", issue = "0",
#[unstable(feature = "const_generic_impls_guard", issue = "none",
reason = "will never be stable, just a temporary step until const generics are stable")]
pub trait LengthAtMost32 {}

macro_rules! array_impls {
($($N:literal)+) => {
$(
#[unstable(feature = "const_generic_impls_guard", issue = "0")]
#[unstable(feature = "const_generic_impls_guard", issue = "none")]
impl<T> LengthAtMost32 for [T; $N] {}
)+
}
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/char/convert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl ParseCharError {
#[unstable(
feature = "char_error_internals",
reason = "this method should not be available publicly",
issue = "0"
issue = "none"
)]
#[doc(hidden)]
pub fn __description(&self) -> &str {
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/clone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ pub macro Clone($item:item) {
#[unstable(
feature = "derive_clone_copy",
reason = "deriving hack, should not be public",
issue = "0"
issue = "none"
)]
pub struct AssertParamIsClone<T: Clone + ?Sized> {
_field: crate::marker::PhantomData<T>,
Expand All @@ -160,7 +160,7 @@ pub struct AssertParamIsClone<T: Clone + ?Sized> {
#[unstable(
feature = "derive_clone_copy",
reason = "deriving hack, should not be public",
issue = "0"
issue = "none"
)]
pub struct AssertParamIsCopy<T: Copy + ?Sized> {
_field: crate::marker::PhantomData<T>,
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/cmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ pub macro Eq($item:item) { /* compiler built-in */ }
#[allow(missing_debug_implementations)]
#[unstable(feature = "derive_eq",
reason = "deriving hack, should not be public",
issue = "0")]
issue = "none")]
pub struct AssertParamIsEq<T: Eq + ?Sized> { _field: crate::marker::PhantomData<T> }

/// An `Ordering` is the result of a comparison between two values.
Expand Down
4 changes: 2 additions & 2 deletions src/libcore/ffi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ pub enum c_void {
#[unstable(
feature = "c_void_variant",
reason = "temporary implementation detail",
issue = "0"
issue = "none"
)]
#[doc(hidden)]
__variant1,
#[unstable(
feature = "c_void_variant",
reason = "temporary implementation detail",
issue = "0"
issue = "none"
)]
#[doc(hidden)]
__variant2,
Expand Down
14 changes: 7 additions & 7 deletions src/libcore/fmt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ pub enum Alignment {
#[stable(feature = "debug_builders", since = "1.2.0")]
pub use self::builders::{DebugList, DebugMap, DebugSet, DebugStruct, DebugTuple};

#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
#[doc(hidden)]
pub mod rt {
pub mod v1;
Expand Down Expand Up @@ -259,7 +259,7 @@ struct Void {
/// types, and then this struct is used to canonicalize arguments to one type.
#[derive(Copy, Clone)]
#[allow(missing_debug_implementations)]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
#[doc(hidden)]
pub struct ArgumentV1<'a> {
value: &'a Void,
Expand All @@ -273,13 +273,13 @@ impl<'a> ArgumentV1<'a> {
}

#[doc(hidden)]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
pub fn new<'b, T>(x: &'b T, f: fn(&T, &mut Formatter<'_>) -> Result) -> ArgumentV1<'b> {
unsafe { ArgumentV1 { formatter: mem::transmute(f), value: mem::transmute(x) } }
}

#[doc(hidden)]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
pub fn from_usize(x: &usize) -> ArgumentV1<'_> {
ArgumentV1::new(x, ArgumentV1::show_usize)
}
Expand Down Expand Up @@ -309,7 +309,7 @@ impl<'a> Arguments<'a> {
/// Arguments structure.
#[doc(hidden)]
#[inline]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
pub fn new_v1(pieces: &'a [&'a str], args: &'a [ArgumentV1<'a>]) -> Arguments<'a> {
Arguments { pieces, fmt: None, args }
}
Expand All @@ -322,7 +322,7 @@ impl<'a> Arguments<'a> {
/// unsafety, but will ignore invalid .
#[doc(hidden)]
#[inline]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
pub fn new_v1_formatted(
pieces: &'a [&'a str],
args: &'a [ArgumentV1<'a>],
Expand All @@ -337,7 +337,7 @@ impl<'a> Arguments<'a> {
/// when using `format!`. Note: this is neither the lower nor upper bound.
#[doc(hidden)]
#[inline]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "0")]
#[unstable(feature = "fmt_internals", reason = "internal to format_args!", issue = "none")]
pub fn estimated_capacity(&self) -> usize {
let pieces_length: usize = self.pieces.iter().map(|x| x.len()).sum();

Expand Down
2 changes: 1 addition & 1 deletion src/libcore/hash/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ use crate::marker;
#[allow(deprecated)]
pub use self::sip::SipHasher;

#[unstable(feature = "hashmap_internals", issue = "0")]
#[unstable(feature = "hashmap_internals", issue = "none")]
#[allow(deprecated)]
#[doc(hidden)]
pub use self::sip::SipHasher13;
Expand Down
10 changes: 5 additions & 5 deletions src/libcore/hash/sip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use crate::ptr;
/// (e.g., `collections::HashMap` uses it by default).
///
/// See: <https://131002.net/siphash>
#[unstable(feature = "hashmap_internals", issue = "0")]
#[unstable(feature = "hashmap_internals", issue = "none")]
#[rustc_deprecated(
since = "1.13.0",
reason = "use `std::collections::hash_map::DefaultHasher` instead"
Expand All @@ -29,7 +29,7 @@ pub struct SipHasher13 {
/// An implementation of SipHash 2-4.
///
/// See: <https://131002.net/siphash/>
#[unstable(feature = "hashmap_internals", issue = "0")]
#[unstable(feature = "hashmap_internals", issue = "none")]
#[rustc_deprecated(
since = "1.13.0",
reason = "use `std::collections::hash_map::DefaultHasher` instead"
Expand Down Expand Up @@ -172,7 +172,7 @@ impl SipHasher {
impl SipHasher13 {
/// Creates a new `SipHasher13` with the two initial keys set to 0.
#[inline]
#[unstable(feature = "hashmap_internals", issue = "0")]
#[unstable(feature = "hashmap_internals", issue = "none")]
#[rustc_deprecated(
since = "1.13.0",
reason = "use `std::collections::hash_map::DefaultHasher` instead"
Expand All @@ -183,7 +183,7 @@ impl SipHasher13 {

/// Creates a `SipHasher13` that is keyed off the provided keys.
#[inline]
#[unstable(feature = "hashmap_internals", issue = "0")]
#[unstable(feature = "hashmap_internals", issue = "none")]
#[rustc_deprecated(
since = "1.13.0",
reason = "use `std::collections::hash_map::DefaultHasher` instead"
Expand Down Expand Up @@ -264,7 +264,7 @@ impl super::Hasher for SipHasher {
}
}

#[unstable(feature = "hashmap_internals", issue = "0")]
#[unstable(feature = "hashmap_internals", issue = "none")]
impl super::Hasher for SipHasher13 {
#[inline]
fn write(&mut self, msg: &[u8]) {
Expand Down
2 changes: 1 addition & 1 deletion src/libcore/internal_macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ macro_rules! forward_ref_op_assign {
}

/// Create a zero-size type similar to a closure type, but named.
#[unstable(feature = "std_internals", issue = "0")]
#[unstable(feature = "std_internals", issue = "none")]
macro_rules! impl_fn_for_zst {
($(
$( #[$attr: meta] )*
Expand Down
6 changes: 3 additions & 3 deletions src/libcore/intrinsics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
reason = "intrinsics are unlikely to ever be stabilized, instead \
they should be used through stabilized interfaces \
in the rest of the standard library",
issue = "0")]
issue = "none")]
#![allow(missing_docs)]

use crate::mem;
Expand Down Expand Up @@ -709,7 +709,7 @@ extern "rust-intrinsic" {
reason = "intrinsics are unlikely to ever be stabilized, instead \
they should be used through stabilized interfaces \
in the rest of the standard library",
issue = "0")]
issue = "none")]
#[rustc_deprecated(reason = "superseded by MaybeUninit, removal planned",
since = "1.38.0")]
pub fn init<T>() -> T;
Expand All @@ -725,7 +725,7 @@ extern "rust-intrinsic" {
reason = "intrinsics are unlikely to ever be stabilized, instead \
they should be used through stabilized interfaces \
in the rest of the standard library",
issue = "0")]
issue = "none")]
#[rustc_deprecated(reason = "superseded by MaybeUninit, removal planned",
since = "1.38.0")]
pub fn uninit<T>() -> T;
Expand Down
Loading

0 comments on commit 3982d35

Please sign in to comment.