Rollup merge of #105938 - andersk:coerce_unsized-tracking, r=Dylan-DPC
Update coerce_unsized tracking issue from #27732 to #18598 Issue #27732 was closed as a duplicate of #18598.
This commit is contained in:
commit
ced6f38c99
@ -2033,7 +2033,7 @@ extern "rust-call" fn call(&self, args: Args) -> Self::Output {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: ?Sized + Unsize<U>, U: ?Sized, A: Allocator> CoerceUnsized<Box<U, A>> for Box<T, A> {}
|
impl<T: ?Sized + Unsize<U>, U: ?Sized, A: Allocator> CoerceUnsized<Box<U, A>> for Box<T, A> {}
|
||||||
|
|
||||||
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
||||||
|
@ -336,7 +336,7 @@ impl<T: RefUnwindSafe + ?Sized> UnwindSafe for Rc<T> {}
|
|||||||
#[stable(feature = "rc_ref_unwind_safe", since = "1.58.0")]
|
#[stable(feature = "rc_ref_unwind_safe", since = "1.58.0")]
|
||||||
impl<T: RefUnwindSafe + ?Sized> RefUnwindSafe for Rc<T> {}
|
impl<T: RefUnwindSafe + ?Sized> RefUnwindSafe for Rc<T> {}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Rc<U>> for Rc<T> {}
|
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Rc<U>> for Rc<T> {}
|
||||||
|
|
||||||
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
||||||
@ -2190,7 +2190,7 @@ impl<T: ?Sized> !marker::Send for Weak<T> {}
|
|||||||
#[stable(feature = "rc_weak", since = "1.4.0")]
|
#[stable(feature = "rc_weak", since = "1.4.0")]
|
||||||
impl<T: ?Sized> !marker::Sync for Weak<T> {}
|
impl<T: ?Sized> !marker::Sync for Weak<T> {}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
|
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
|
||||||
|
|
||||||
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
||||||
|
@ -254,7 +254,7 @@ unsafe impl<T: ?Sized + Sync + Send> Sync for Arc<T> {}
|
|||||||
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
#[stable(feature = "catch_unwind", since = "1.9.0")]
|
||||||
impl<T: RefUnwindSafe + ?Sized> UnwindSafe for Arc<T> {}
|
impl<T: RefUnwindSafe + ?Sized> UnwindSafe for Arc<T> {}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {}
|
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Arc<U>> for Arc<T> {}
|
||||||
|
|
||||||
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
||||||
@ -306,7 +306,7 @@ unsafe impl<T: ?Sized + Sync + Send> Send for Weak<T> {}
|
|||||||
#[stable(feature = "arc_weak", since = "1.4.0")]
|
#[stable(feature = "arc_weak", since = "1.4.0")]
|
||||||
unsafe impl<T: ?Sized + Sync + Send> Sync for Weak<T> {}
|
unsafe impl<T: ?Sized + Sync + Send> Sync for Weak<T> {}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
|
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Weak<U>> for Weak<T> {}
|
||||||
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
||||||
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Weak<U>> for Weak<T> {}
|
impl<T: ?Sized + Unsize<U>, U: ?Sized> DispatchFromDyn<Weak<U>> for Weak<T> {}
|
||||||
|
@ -568,7 +568,7 @@ pub fn take(&self) -> T {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: CoerceUnsized<U>, U> CoerceUnsized<Cell<U>> for Cell<T> {}
|
impl<T: CoerceUnsized<U>, U> CoerceUnsized<Cell<U>> for Cell<T> {}
|
||||||
|
|
||||||
impl<T> Cell<[T]> {
|
impl<T> Cell<[T]> {
|
||||||
@ -1266,7 +1266,7 @@ fn from(t: T) -> RefCell<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: CoerceUnsized<U>, U> CoerceUnsized<RefCell<U>> for RefCell<T> {}
|
impl<T: CoerceUnsized<U>, U> CoerceUnsized<RefCell<U>> for RefCell<T> {}
|
||||||
|
|
||||||
struct BorrowRef<'b> {
|
struct BorrowRef<'b> {
|
||||||
@ -1492,7 +1492,7 @@ pub fn leak(orig: Ref<'b, T>) -> &'b T {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Ref<'b, U>> for Ref<'b, T> {}
|
impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<Ref<'b, U>> for Ref<'b, T> {}
|
||||||
|
|
||||||
#[stable(feature = "std_guard_impls", since = "1.20.0")]
|
#[stable(feature = "std_guard_impls", since = "1.20.0")]
|
||||||
@ -1738,7 +1738,7 @@ fn deref_mut(&mut self) -> &mut T {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<RefMut<'b, U>> for RefMut<'b, T> {}
|
impl<'b, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<RefMut<'b, U>> for RefMut<'b, T> {}
|
||||||
|
|
||||||
#[stable(feature = "std_guard_impls", since = "1.20.0")]
|
#[stable(feature = "std_guard_impls", since = "1.20.0")]
|
||||||
@ -2074,7 +2074,7 @@ fn from(t: T) -> UnsafeCell<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: CoerceUnsized<U>, U> CoerceUnsized<UnsafeCell<U>> for UnsafeCell<T> {}
|
impl<T: CoerceUnsized<U>, U> CoerceUnsized<UnsafeCell<U>> for UnsafeCell<T> {}
|
||||||
|
|
||||||
/// [`UnsafeCell`], but [`Sync`].
|
/// [`UnsafeCell`], but [`Sync`].
|
||||||
@ -2164,7 +2164,7 @@ fn from(t: T) -> SyncUnsafeCell<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
//#[unstable(feature = "sync_unsafe_cell", issue = "95439")]
|
//#[unstable(feature = "sync_unsafe_cell", issue = "95439")]
|
||||||
impl<T: CoerceUnsized<U>, U> CoerceUnsized<SyncUnsafeCell<U>> for SyncUnsafeCell<T> {}
|
impl<T: CoerceUnsized<U>, U> CoerceUnsized<SyncUnsafeCell<U>> for SyncUnsafeCell<T> {}
|
||||||
|
|
||||||
|
@ -126,7 +126,7 @@ pub trait Sized {
|
|||||||
/// [`Rc`]: ../../std/rc/struct.Rc.html
|
/// [`Rc`]: ../../std/rc/struct.Rc.html
|
||||||
/// [RFC982]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
|
/// [RFC982]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
|
||||||
/// [nomicon-coerce]: ../../nomicon/coercions.html
|
/// [nomicon-coerce]: ../../nomicon/coercions.html
|
||||||
#[unstable(feature = "unsize", issue = "27732")]
|
#[unstable(feature = "unsize", issue = "18598")]
|
||||||
#[lang = "unsize"]
|
#[lang = "unsize"]
|
||||||
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl)]
|
#[cfg_attr(not(bootstrap), rustc_deny_explicit_impl)]
|
||||||
pub trait Unsize<T: ?Sized> {
|
pub trait Unsize<T: ?Sized> {
|
||||||
|
@ -201,7 +201,7 @@
|
|||||||
#[unstable(feature = "generator_trait", issue = "43122")]
|
#[unstable(feature = "generator_trait", issue = "43122")]
|
||||||
pub use self::generator::{Generator, GeneratorState};
|
pub use self::generator::{Generator, GeneratorState};
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
pub use self::unsize::CoerceUnsized;
|
pub use self::unsize::CoerceUnsized;
|
||||||
|
|
||||||
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
||||||
|
@ -31,41 +31,41 @@
|
|||||||
/// [dst-coerce]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
|
/// [dst-coerce]: https://github.com/rust-lang/rfcs/blob/master/text/0982-dst-coercion.md
|
||||||
/// [unsize]: crate::marker::Unsize
|
/// [unsize]: crate::marker::Unsize
|
||||||
/// [nomicon-coerce]: ../../nomicon/coercions.html
|
/// [nomicon-coerce]: ../../nomicon/coercions.html
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
#[lang = "coerce_unsized"]
|
#[lang = "coerce_unsized"]
|
||||||
pub trait CoerceUnsized<T: ?Sized> {
|
pub trait CoerceUnsized<T: ?Sized> {
|
||||||
// Empty.
|
// Empty.
|
||||||
}
|
}
|
||||||
|
|
||||||
// &mut T -> &mut U
|
// &mut T -> &mut U
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a mut U> for &'a mut T {}
|
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a mut U> for &'a mut T {}
|
||||||
// &mut T -> &U
|
// &mut T -> &U
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<'a, 'b: 'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b mut T {}
|
impl<'a, 'b: 'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b mut T {}
|
||||||
// &mut T -> *mut U
|
// &mut T -> *mut U
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for &'a mut T {}
|
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for &'a mut T {}
|
||||||
// &mut T -> *const U
|
// &mut T -> *const U
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for &'a mut T {}
|
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for &'a mut T {}
|
||||||
|
|
||||||
// &T -> &U
|
// &T -> &U
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<'a, 'b: 'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b T {}
|
impl<'a, 'b: 'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<&'a U> for &'b T {}
|
||||||
// &T -> *const U
|
// &T -> *const U
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for &'a T {}
|
impl<'a, T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for &'a T {}
|
||||||
|
|
||||||
// *mut T -> *mut U
|
// *mut T -> *mut U
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {}
|
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*mut U> for *mut T {}
|
||||||
// *mut T -> *const U
|
// *mut T -> *const U
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *mut T {}
|
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *mut T {}
|
||||||
|
|
||||||
// *const T -> *const U
|
// *const T -> *const U
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {}
|
impl<T: ?Sized + Unsize<U>, U: ?Sized> CoerceUnsized<*const U> for *const T {}
|
||||||
|
|
||||||
/// `DispatchFromDyn` is used in the implementation of object safety checks (specifically allowing
|
/// `DispatchFromDyn` is used in the implementation of object safety checks (specifically allowing
|
||||||
|
@ -712,7 +712,7 @@ fn clone(&self) -> Self {
|
|||||||
#[stable(feature = "nonnull", since = "1.25.0")]
|
#[stable(feature = "nonnull", since = "1.25.0")]
|
||||||
impl<T: ?Sized> Copy for NonNull<T> {}
|
impl<T: ?Sized> Copy for NonNull<T> {}
|
||||||
|
|
||||||
#[unstable(feature = "coerce_unsized", issue = "27732")]
|
#[unstable(feature = "coerce_unsized", issue = "18598")]
|
||||||
impl<T: ?Sized, U: ?Sized> CoerceUnsized<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
|
impl<T: ?Sized, U: ?Sized> CoerceUnsized<NonNull<U>> for NonNull<T> where T: Unsize<U> {}
|
||||||
|
|
||||||
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
#[unstable(feature = "dispatch_from_dyn", issue = "none")]
|
||||||
|
Loading…
Reference in New Issue
Block a user