mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
Fix a few impl stability attributes
The versions show up in rustdoc.
This commit is contained in:
parent
010c3e25c4
commit
9128f6100c
@ -1088,7 +1088,7 @@ impl<'a, T: 'a> ExactSizeIterator for Drain<'a, T> {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl<'a, T: 'a> FusedIterator for Drain<'a, T> {}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[stable(feature = "binary_heap_extras_15", since = "1.5.0")]
|
||||
impl<T: Ord> From<Vec<T>> for BinaryHeap<T> {
|
||||
fn from(vec: Vec<T>) -> BinaryHeap<T> {
|
||||
let mut heap = BinaryHeap { data: vec };
|
||||
@ -1097,7 +1097,7 @@ impl<T: Ord> From<Vec<T>> for BinaryHeap<T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[stable(feature = "binary_heap_extras_15", since = "1.5.0")]
|
||||
impl<T> From<BinaryHeap<T>> for Vec<T> {
|
||||
fn from(heap: BinaryHeap<T>) -> Vec<T> {
|
||||
heap.data
|
||||
|
@ -588,7 +588,7 @@ impl ExactSizeIterator for EscapeUnicode {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl FusedIterator for EscapeUnicode {}
|
||||
|
||||
#[stable(feature = "char_struct_display", since = "1.17.0")]
|
||||
#[stable(feature = "char_struct_display", since = "1.16.0")]
|
||||
impl fmt::Display for EscapeUnicode {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
for c in self.clone() {
|
||||
@ -701,7 +701,7 @@ impl ExactSizeIterator for EscapeDefault {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl FusedIterator for EscapeDefault {}
|
||||
|
||||
#[stable(feature = "char_struct_display", since = "1.17.0")]
|
||||
#[stable(feature = "char_struct_display", since = "1.16.0")]
|
||||
impl fmt::Display for EscapeDefault {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
for c in self.clone() {
|
||||
@ -735,7 +735,7 @@ impl ExactSizeIterator for EscapeDebug { }
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl FusedIterator for EscapeDebug {}
|
||||
|
||||
#[stable(feature = "char_struct_display", since = "1.17.0")]
|
||||
#[unstable(feature = "char_escape_debug", issue = "35068")]
|
||||
impl fmt::Display for EscapeDebug {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Display::fmt(&self.0, f)
|
||||
|
@ -13,7 +13,11 @@
|
||||
// based on "op T" where T is expected to be `Copy`able
|
||||
macro_rules! forward_ref_unop {
|
||||
(impl $imp:ident, $method:ident for $t:ty) => {
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
forward_ref_unop!(impl $imp, $method for $t,
|
||||
#[stable(feature = "rust1", since = "1.0.0")]);
|
||||
};
|
||||
(impl $imp:ident, $method:ident for $t:ty, #[$attr:meta]) => {
|
||||
#[$attr]
|
||||
impl<'a> $imp for &'a $t {
|
||||
type Output = <$t as $imp>::Output;
|
||||
|
||||
@ -29,7 +33,11 @@ macro_rules! forward_ref_unop {
|
||||
// based on "T op U" where T and U are expected to be `Copy`able
|
||||
macro_rules! forward_ref_binop {
|
||||
(impl $imp:ident, $method:ident for $t:ty, $u:ty) => {
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
forward_ref_binop!(impl $imp, $method for $t, $u,
|
||||
#[stable(feature = "rust1", since = "1.0.0")]);
|
||||
};
|
||||
(impl $imp:ident, $method:ident for $t:ty, $u:ty, #[$attr:meta]) => {
|
||||
#[$attr]
|
||||
impl<'a> $imp<$u> for &'a $t {
|
||||
type Output = <$t as $imp<$u>>::Output;
|
||||
|
||||
@ -39,7 +47,7 @@ macro_rules! forward_ref_binop {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[$attr]
|
||||
impl<'a> $imp<&'a $u> for $t {
|
||||
type Output = <$t as $imp<$u>>::Output;
|
||||
|
||||
@ -49,7 +57,7 @@ macro_rules! forward_ref_binop {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
#[$attr]
|
||||
impl<'a, 'b> $imp<&'a $u> for &'b $t {
|
||||
type Output = <$t as $imp<$u>>::Output;
|
||||
|
||||
|
@ -603,29 +603,29 @@ pub trait Product<A = Self>: Sized {
|
||||
|
||||
// NB: explicitly use Add and Mul here to inherit overflow checks
|
||||
macro_rules! integer_sum_product {
|
||||
(@impls $zero:expr, $one:expr, $($a:ty)*) => ($(
|
||||
#[stable(feature = "iter_arith_traits", since = "1.12.0")]
|
||||
(@impls $zero:expr, $one:expr, #[$attr:meta], $($a:ty)*) => ($(
|
||||
#[$attr]
|
||||
impl Sum for $a {
|
||||
fn sum<I: Iterator<Item=$a>>(iter: I) -> $a {
|
||||
iter.fold($zero, Add::add)
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "iter_arith_traits", since = "1.12.0")]
|
||||
#[$attr]
|
||||
impl Product for $a {
|
||||
fn product<I: Iterator<Item=$a>>(iter: I) -> $a {
|
||||
iter.fold($one, Mul::mul)
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "iter_arith_traits", since = "1.12.0")]
|
||||
#[$attr]
|
||||
impl<'a> Sum<&'a $a> for $a {
|
||||
fn sum<I: Iterator<Item=&'a $a>>(iter: I) -> $a {
|
||||
iter.fold($zero, Add::add)
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "iter_arith_traits", since = "1.12.0")]
|
||||
#[$attr]
|
||||
impl<'a> Product<&'a $a> for $a {
|
||||
fn product<I: Iterator<Item=&'a $a>>(iter: I) -> $a {
|
||||
iter.fold($one, Mul::mul)
|
||||
@ -633,8 +633,12 @@ macro_rules! integer_sum_product {
|
||||
}
|
||||
)*);
|
||||
($($a:ty)*) => (
|
||||
integer_sum_product!(@impls 0, 1, $($a)+);
|
||||
integer_sum_product!(@impls Wrapping(0), Wrapping(1), $(Wrapping<$a>)+);
|
||||
integer_sum_product!(@impls 0, 1,
|
||||
#[stable(feature = "iter_arith_traits", since = "1.12.0")],
|
||||
$($a)+);
|
||||
integer_sum_product!(@impls Wrapping(0), Wrapping(1),
|
||||
#[stable(feature = "wrapping_iter_arith", since = "1.14.0")],
|
||||
$(Wrapping<$a>)+);
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -12,12 +12,12 @@
|
||||
|
||||
macro_rules! int_module {
|
||||
($T:ident) => (int_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
|
||||
($T:ident, $($attr: tt)*) => (
|
||||
($T:ident, #[$attr:meta]) => (
|
||||
/// The smallest value that can be represented by this integer type.
|
||||
$($attr)*
|
||||
#[$attr]
|
||||
pub const MIN: $T = $T::min_value();
|
||||
/// The largest value that can be represented by this integer type.
|
||||
$($attr)*
|
||||
#[$attr]
|
||||
pub const MAX: $T = $T::max_value();
|
||||
)
|
||||
}
|
||||
|
@ -12,12 +12,12 @@
|
||||
|
||||
macro_rules! uint_module {
|
||||
($T:ident) => (uint_module!($T, #[stable(feature = "rust1", since = "1.0.0")]););
|
||||
($T:ident, $($attr: tt)*) => (
|
||||
($T:ident, #[$attr:meta]) => (
|
||||
/// The smallest value that can be represented by this integer type.
|
||||
$($attr)*
|
||||
#[$attr]
|
||||
pub const MIN: $T = $T::min_value();
|
||||
/// The largest value that can be represented by this integer type.
|
||||
$($attr)*
|
||||
#[$attr]
|
||||
pub const MAX: $T = $T::max_value();
|
||||
)
|
||||
}
|
||||
|
@ -131,7 +131,8 @@ macro_rules! wrapping_impl {
|
||||
Wrapping(self.0.wrapping_add(other.0))
|
||||
}
|
||||
}
|
||||
forward_ref_binop! { impl Add, add for Wrapping<$t>, Wrapping<$t> }
|
||||
forward_ref_binop! { impl Add, add for Wrapping<$t>, Wrapping<$t>,
|
||||
#[stable(feature = "wrapping_ref", since = "1.14.0")] }
|
||||
|
||||
#[stable(feature = "op_assign_traits", since = "1.8.0")]
|
||||
impl AddAssign for Wrapping<$t> {
|
||||
@ -150,7 +151,8 @@ macro_rules! wrapping_impl {
|
||||
Wrapping(self.0.wrapping_sub(other.0))
|
||||
}
|
||||
}
|
||||
forward_ref_binop! { impl Sub, sub for Wrapping<$t>, Wrapping<$t> }
|
||||
forward_ref_binop! { impl Sub, sub for Wrapping<$t>, Wrapping<$t>,
|
||||
#[stable(feature = "wrapping_ref", since = "1.14.0")] }
|
||||
|
||||
#[stable(feature = "op_assign_traits", since = "1.8.0")]
|
||||
impl SubAssign for Wrapping<$t> {
|
||||
@ -169,7 +171,8 @@ macro_rules! wrapping_impl {
|
||||
Wrapping(self.0.wrapping_mul(other.0))
|
||||
}
|
||||
}
|
||||
forward_ref_binop! { impl Mul, mul for Wrapping<$t>, Wrapping<$t> }
|
||||
forward_ref_binop! { impl Mul, mul for Wrapping<$t>, Wrapping<$t>,
|
||||
#[stable(feature = "wrapping_ref", since = "1.14.0")] }
|
||||
|
||||
#[stable(feature = "op_assign_traits", since = "1.8.0")]
|
||||
impl MulAssign for Wrapping<$t> {
|
||||
@ -188,7 +191,8 @@ macro_rules! wrapping_impl {
|
||||
Wrapping(self.0.wrapping_div(other.0))
|
||||
}
|
||||
}
|
||||
forward_ref_binop! { impl Div, div for Wrapping<$t>, Wrapping<$t> }
|
||||
forward_ref_binop! { impl Div, div for Wrapping<$t>, Wrapping<$t>,
|
||||
#[stable(feature = "wrapping_ref", since = "1.14.0")] }
|
||||
|
||||
#[stable(feature = "op_assign_traits", since = "1.8.0")]
|
||||
impl DivAssign for Wrapping<$t> {
|
||||
@ -207,7 +211,8 @@ macro_rules! wrapping_impl {
|
||||
Wrapping(self.0.wrapping_rem(other.0))
|
||||
}
|
||||
}
|
||||
forward_ref_binop! { impl Rem, rem for Wrapping<$t>, Wrapping<$t> }
|
||||
forward_ref_binop! { impl Rem, rem for Wrapping<$t>, Wrapping<$t>,
|
||||
#[stable(feature = "wrapping_ref", since = "1.14.0")] }
|
||||
|
||||
#[stable(feature = "op_assign_traits", since = "1.8.0")]
|
||||
impl RemAssign for Wrapping<$t> {
|
||||
@ -226,7 +231,8 @@ macro_rules! wrapping_impl {
|
||||
Wrapping(!self.0)
|
||||
}
|
||||
}
|
||||
forward_ref_unop! { impl Not, not for Wrapping<$t> }
|
||||
forward_ref_unop! { impl Not, not for Wrapping<$t>,
|
||||
#[stable(feature = "wrapping_ref", since = "1.14.0")] }
|
||||
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
impl BitXor for Wrapping<$t> {
|
||||
@ -237,7 +243,8 @@ macro_rules! wrapping_impl {
|
||||
Wrapping(self.0 ^ other.0)
|
||||
}
|
||||
}
|
||||
forward_ref_binop! { impl BitXor, bitxor for Wrapping<$t>, Wrapping<$t> }
|
||||
forward_ref_binop! { impl BitXor, bitxor for Wrapping<$t>, Wrapping<$t>,
|
||||
#[stable(feature = "wrapping_ref", since = "1.14.0")] }
|
||||
|
||||
#[stable(feature = "op_assign_traits", since = "1.8.0")]
|
||||
impl BitXorAssign for Wrapping<$t> {
|
||||
@ -256,7 +263,8 @@ macro_rules! wrapping_impl {
|
||||
Wrapping(self.0 | other.0)
|
||||
}
|
||||
}
|
||||
forward_ref_binop! { impl BitOr, bitor for Wrapping<$t>, Wrapping<$t> }
|
||||
forward_ref_binop! { impl BitOr, bitor for Wrapping<$t>, Wrapping<$t>,
|
||||
#[stable(feature = "wrapping_ref", since = "1.14.0")] }
|
||||
|
||||
#[stable(feature = "op_assign_traits", since = "1.8.0")]
|
||||
impl BitOrAssign for Wrapping<$t> {
|
||||
@ -275,7 +283,8 @@ macro_rules! wrapping_impl {
|
||||
Wrapping(self.0 & other.0)
|
||||
}
|
||||
}
|
||||
forward_ref_binop! { impl BitAnd, bitand for Wrapping<$t>, Wrapping<$t> }
|
||||
forward_ref_binop! { impl BitAnd, bitand for Wrapping<$t>, Wrapping<$t>,
|
||||
#[stable(feature = "wrapping_ref", since = "1.14.0")] }
|
||||
|
||||
#[stable(feature = "op_assign_traits", since = "1.8.0")]
|
||||
impl BitAndAssign for Wrapping<$t> {
|
||||
@ -293,7 +302,8 @@ macro_rules! wrapping_impl {
|
||||
Wrapping(0) - self
|
||||
}
|
||||
}
|
||||
forward_ref_unop! { impl Neg, neg for Wrapping<$t> }
|
||||
forward_ref_unop! { impl Neg, neg for Wrapping<$t>,
|
||||
#[stable(feature = "wrapping_ref", since = "1.14.0")] }
|
||||
)*)
|
||||
}
|
||||
|
||||
|
@ -616,7 +616,7 @@ pub trait SliceIndex<T> {
|
||||
fn index_mut(self, slice: &mut [T]) -> &mut Self::Output;
|
||||
}
|
||||
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.13.0")]
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.15.0")]
|
||||
impl<T> SliceIndex<T> for usize {
|
||||
type Output = T;
|
||||
|
||||
@ -665,7 +665,7 @@ impl<T> SliceIndex<T> for usize {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.13.0")]
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.15.0")]
|
||||
impl<T> SliceIndex<T> for ops::Range<usize> {
|
||||
type Output = [T];
|
||||
|
||||
@ -726,7 +726,7 @@ impl<T> SliceIndex<T> for ops::Range<usize> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.13.0")]
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.15.0")]
|
||||
impl<T> SliceIndex<T> for ops::RangeTo<usize> {
|
||||
type Output = [T];
|
||||
|
||||
@ -761,7 +761,7 @@ impl<T> SliceIndex<T> for ops::RangeTo<usize> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.13.0")]
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.15.0")]
|
||||
impl<T> SliceIndex<T> for ops::RangeFrom<usize> {
|
||||
type Output = [T];
|
||||
|
||||
@ -796,7 +796,7 @@ impl<T> SliceIndex<T> for ops::RangeFrom<usize> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.13.0")]
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.15.0")]
|
||||
impl<T> SliceIndex<T> for ops::RangeFull {
|
||||
type Output = [T];
|
||||
|
||||
@ -832,7 +832,7 @@ impl<T> SliceIndex<T> for ops::RangeFull {
|
||||
}
|
||||
|
||||
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.13.0")]
|
||||
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
|
||||
impl<T> SliceIndex<T> for ops::RangeInclusive<usize> {
|
||||
type Output = [T];
|
||||
|
||||
@ -895,7 +895,7 @@ impl<T> SliceIndex<T> for ops::RangeInclusive<usize> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "slice-get-slice-impls", since = "1.13.0")]
|
||||
#[unstable(feature = "inclusive_range", reason = "recently added, follows RFC", issue = "28237")]
|
||||
impl<T> SliceIndex<T> for ops::RangeToInclusive<usize> {
|
||||
type Output = [T];
|
||||
|
||||
|
@ -399,7 +399,7 @@ impl ExactSizeIterator for EscapeDefault {}
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl FusedIterator for EscapeDefault {}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for EscapeDefault {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("EscapeDefault { .. }")
|
||||
|
@ -1276,7 +1276,7 @@ impl<'a, K, V> Clone for Iter<'a, K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, K: Debug, V: Debug> fmt::Debug for Iter<'a, K, V> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_list()
|
||||
@ -1311,7 +1311,7 @@ impl<'a, K, V> Clone for Keys<'a, K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, K: Debug, V: Debug> fmt::Debug for Keys<'a, K, V> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_list()
|
||||
@ -1334,7 +1334,7 @@ impl<'a, K, V> Clone for Values<'a, K, V> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, K: Debug, V: Debug> fmt::Debug for Values<'a, K, V> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_list()
|
||||
@ -1584,7 +1584,7 @@ impl<'a, K, V> ExactSizeIterator for IterMut<'a, K, V> {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl<'a, K, V> FusedIterator for IterMut<'a, K, V> {}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, K, V> fmt::Debug for IterMut<'a, K, V>
|
||||
where K: fmt::Debug,
|
||||
V: fmt::Debug,
|
||||
@ -1619,7 +1619,7 @@ impl<K, V> ExactSizeIterator for IntoIter<K, V> {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl<K, V> FusedIterator for IntoIter<K, V> {}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<K: Debug, V: Debug> fmt::Debug for IntoIter<K, V> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_list()
|
||||
@ -1697,7 +1697,7 @@ impl<'a, K, V> ExactSizeIterator for ValuesMut<'a, K, V> {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl<'a, K, V> FusedIterator for ValuesMut<'a, K, V> {}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, K, V> fmt::Debug for ValuesMut<'a, K, V>
|
||||
where K: fmt::Debug,
|
||||
V: fmt::Debug,
|
||||
@ -1732,7 +1732,7 @@ impl<'a, K, V> ExactSizeIterator for Drain<'a, K, V> {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl<'a, K, V> FusedIterator for Drain<'a, K, V> {}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, K, V> fmt::Debug for Drain<'a, K, V>
|
||||
where K: fmt::Debug,
|
||||
V: fmt::Debug,
|
||||
@ -2220,7 +2220,7 @@ impl Default for RandomState {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for RandomState {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("RandomState { .. }")
|
||||
|
@ -948,7 +948,7 @@ impl<'a, K> ExactSizeIterator for Iter<'a, K> {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl<'a, K> FusedIterator for Iter<'a, K> {}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, K: fmt::Debug> fmt::Debug for Iter<'a, K> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_list()
|
||||
@ -977,7 +977,7 @@ impl<K> ExactSizeIterator for IntoIter<K> {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl<K> FusedIterator for IntoIter<K> {}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<K: fmt::Debug> fmt::Debug for IntoIter<K> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let entries_iter = self.iter.inner.iter().map(|(k, _)| k);
|
||||
@ -1007,7 +1007,7 @@ impl<'a, K> ExactSizeIterator for Drain<'a, K> {
|
||||
#[unstable(feature = "fused", issue = "35602")]
|
||||
impl<'a, K> FusedIterator for Drain<'a, K> {}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, K: fmt::Debug> fmt::Debug for Drain<'a, K> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
let entries_iter = self.iter.inner.iter().map(|(k, _)| k);
|
||||
@ -1050,7 +1050,7 @@ impl<'a, T, S> Iterator for Intersection<'a, T, S>
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, T, S> fmt::Debug for Intersection<'a, T, S>
|
||||
where T: fmt::Debug + Eq + Hash,
|
||||
S: BuildHasher,
|
||||
@ -1109,7 +1109,7 @@ impl<'a, T, S> FusedIterator for Difference<'a, T, S>
|
||||
{
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, T, S> fmt::Debug for Difference<'a, T, S>
|
||||
where T: fmt::Debug + Eq + Hash,
|
||||
S: BuildHasher,
|
||||
@ -1150,7 +1150,7 @@ impl<'a, T, S> FusedIterator for SymmetricDifference<'a, T, S>
|
||||
{
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, T, S> fmt::Debug for SymmetricDifference<'a, T, S>
|
||||
where T: fmt::Debug + Eq + Hash,
|
||||
S: BuildHasher,
|
||||
@ -1176,7 +1176,7 @@ impl<'a, T, S> FusedIterator for Union<'a, T, S>
|
||||
{
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, T, S> fmt::Debug for Union<'a, T, S>
|
||||
where T: fmt::Debug + Eq + Hash,
|
||||
S: BuildHasher,
|
||||
|
@ -145,7 +145,7 @@ impl Iterator for Vars {
|
||||
fn size_hint(&self) -> (usize, Option<usize>) { self.inner.size_hint() }
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Vars {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Vars { .. }")
|
||||
@ -159,7 +159,7 @@ impl Iterator for VarsOs {
|
||||
fn size_hint(&self) -> (usize, Option<usize>) { self.inner.size_hint() }
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for VarsOs {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("VarsOs { .. }")
|
||||
@ -382,7 +382,7 @@ impl<'a> Iterator for SplitPaths<'a> {
|
||||
fn size_hint(&self) -> (usize, Option<usize>) { self.inner.size_hint() }
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a> fmt::Debug for SplitPaths<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("SplitPaths { .. }")
|
||||
@ -665,7 +665,7 @@ impl DoubleEndedIterator for Args {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Args {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Args { .. }")
|
||||
@ -690,7 +690,7 @@ impl DoubleEndedIterator for ArgsOs {
|
||||
fn next_back(&mut self) -> Option<OsString> { self.inner.next_back() }
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for ArgsOs {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("ArgsOs { .. }")
|
||||
|
@ -869,7 +869,7 @@ impl Metadata {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Metadata {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_struct("Metadata")
|
||||
|
@ -1450,7 +1450,7 @@ pub struct Chain<T, U> {
|
||||
done_first: bool,
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<T: fmt::Debug, U: fmt::Debug> fmt::Debug for Chain<T, U> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_struct("Chain")
|
||||
|
@ -282,7 +282,7 @@ impl Stdin {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Stdin {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Stdin { .. }")
|
||||
@ -321,7 +321,7 @@ impl<'a> BufRead for StdinLock<'a> {
|
||||
fn consume(&mut self, n: usize) { self.inner.consume(n) }
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a> fmt::Debug for StdinLock<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("StdinLock { .. }")
|
||||
@ -438,7 +438,7 @@ impl Stdout {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Stdout {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Stdout { .. }")
|
||||
@ -470,7 +470,7 @@ impl<'a> Write for StdoutLock<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a> fmt::Debug for StdoutLock<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("StdoutLock { .. }")
|
||||
@ -573,7 +573,7 @@ impl Stderr {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Stderr {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Stderr { .. }")
|
||||
@ -605,7 +605,7 @@ impl<'a> Write for StderrLock<'a> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a> fmt::Debug for StderrLock<'a> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("StderrLock { .. }")
|
||||
|
@ -98,7 +98,7 @@ impl BufRead for Empty {
|
||||
fn consume(&mut self, _n: usize) {}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Empty {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Empty { .. }")
|
||||
@ -141,7 +141,7 @@ impl Read for Repeat {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Repeat {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Repeat { .. }")
|
||||
@ -180,7 +180,7 @@ impl Write for Sink {
|
||||
fn flush(&mut self) -> io::Result<()> { Ok(()) }
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Sink {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Sink { .. }")
|
||||
|
@ -106,7 +106,10 @@ impl Iterator for LookupHost {
|
||||
fn next(&mut self) -> Option<SocketAddr> { self.0.next() }
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[unstable(feature = "lookup_host", reason = "unsure about the returned \
|
||||
iterator and returning socket \
|
||||
addresses",
|
||||
issue = "27705")]
|
||||
impl fmt::Debug for LookupHost {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("LookupHost { .. }")
|
||||
|
@ -73,7 +73,7 @@ pub enum c_void {
|
||||
#[doc(hidden)] __variant2,
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for c_void {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("c_void")
|
||||
|
@ -297,7 +297,7 @@ impl<R, F: FnOnce() -> R> FnOnce<()> for AssertUnwindSafe<F> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<T: fmt::Debug> fmt::Debug for AssertUnwindSafe<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_tuple("AssertUnwindSafe")
|
||||
|
@ -114,7 +114,7 @@ impl IntoInner<imp::Process> for Child {
|
||||
fn into_inner(self) -> imp::Process { self.handle }
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Child {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_struct("Child")
|
||||
@ -160,7 +160,7 @@ impl FromInner<AnonPipe> for ChildStdin {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for ChildStdin {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("ChildStdin { .. }")
|
||||
@ -201,7 +201,7 @@ impl FromInner<AnonPipe> for ChildStdout {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for ChildStdout {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("ChildStdout { .. }")
|
||||
@ -242,7 +242,7 @@ impl FromInner<AnonPipe> for ChildStderr {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for ChildStderr {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("ChildStderr { .. }")
|
||||
@ -696,7 +696,7 @@ impl FromInner<imp::Stdio> for Stdio {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Stdio {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Stdio { .. }")
|
||||
|
@ -55,7 +55,7 @@ struct BarrierState {
|
||||
#[stable(feature = "rust1", since = "1.0.0")]
|
||||
pub struct BarrierWaitResult(bool);
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Barrier {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Barrier { .. }")
|
||||
@ -110,7 +110,7 @@ impl Barrier {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for BarrierWaitResult {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_struct("BarrierWaitResult")
|
||||
|
@ -240,7 +240,7 @@ impl Condvar {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Condvar {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Condvar { .. }")
|
||||
|
@ -428,7 +428,7 @@ impl<'a, T: ?Sized> Drop for MutexGuard<'a, T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, T: ?Sized + fmt::Debug> fmt::Debug for MutexGuard<'a, T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_struct("MutexGuard")
|
||||
|
@ -330,7 +330,7 @@ impl Once {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl fmt::Debug for Once {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Once { .. }")
|
||||
|
@ -361,7 +361,7 @@ impl<'rwlock, T: ?Sized> RwLockWriteGuard<'rwlock, T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, T: fmt::Debug> fmt::Debug for RwLockReadGuard<'a, T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_struct("RwLockReadGuard")
|
||||
@ -370,7 +370,7 @@ impl<'a, T: fmt::Debug> fmt::Debug for RwLockReadGuard<'a, T> {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<'a, T: fmt::Debug> fmt::Debug for RwLockWriteGuard<'a, T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.debug_struct("RwLockWriteGuard")
|
||||
|
@ -99,7 +99,7 @@ pub struct LocalKey<T: 'static> {
|
||||
init: fn() -> T,
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<T: 'static> fmt::Debug for LocalKey<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("LocalKey { .. }")
|
||||
@ -332,7 +332,6 @@ pub mod os {
|
||||
marker: marker::PhantomData<Cell<T>>,
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
impl<T> fmt::Debug for Key<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("Key { .. }")
|
||||
|
@ -698,7 +698,7 @@ impl ThreadId {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[unstable(feature = "thread_id", issue = "21507")]
|
||||
impl fmt::Debug for ThreadId {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("ThreadId { .. }")
|
||||
@ -1002,7 +1002,7 @@ impl<T> IntoInner<imp::Thread> for JoinHandle<T> {
|
||||
fn into_inner(self) -> imp::Thread { self.0.native.unwrap() }
|
||||
}
|
||||
|
||||
#[stable(feature = "std_debug", since = "1.15.0")]
|
||||
#[stable(feature = "std_debug", since = "1.16.0")]
|
||||
impl<T> fmt::Debug for JoinHandle<T> {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
f.pad("JoinHandle { .. }")
|
||||
|
@ -131,7 +131,6 @@ impl Iterator for CaseMappingIter {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "char_struct_display", since = "1.17.0")]
|
||||
impl fmt::Display for CaseMappingIter {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
match *self {
|
||||
@ -152,14 +151,14 @@ impl fmt::Display for CaseMappingIter {
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "char_struct_display", since = "1.17.0")]
|
||||
#[stable(feature = "char_struct_display", since = "1.16.0")]
|
||||
impl fmt::Display for ToLowercase {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Display::fmt(&self.0, f)
|
||||
}
|
||||
}
|
||||
|
||||
#[stable(feature = "char_struct_display", since = "1.17.0")]
|
||||
#[stable(feature = "char_struct_display", since = "1.16.0")]
|
||||
impl fmt::Display for ToUppercase {
|
||||
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
|
||||
fmt::Display::fmt(&self.0, f)
|
||||
|
Loading…
Reference in New Issue
Block a user