Skip to content

Commit 6c6a2c1

Browse files
durkaalexcrichton
authored andcommitted
update "since" for discriminant_value
It's going to be backported to beta.
1 parent 214abf2 commit 6c6a2c1

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/libcore/mem.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -754,39 +754,39 @@ pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
754754
/// Opaque type representing the discriminant of an enum.
755755
///
756756
/// See the `discriminant` function in this module for more information.
757-
#[stable(feature = "discriminant_value", since = "1.22.0")]
757+
#[stable(feature = "discriminant_value", since = "1.21.0")]
758758
pub struct Discriminant<T>(u64, PhantomData<*const T>);
759759

760760
// N.B. These trait implementations cannot be derived because we don't want any bounds on T.
761761

762-
#[stable(feature = "discriminant_value", since = "1.22.0")]
762+
#[stable(feature = "discriminant_value", since = "1.21.0")]
763763
impl<T> Copy for Discriminant<T> {}
764764

765-
#[stable(feature = "discriminant_value", since = "1.22.0")]
765+
#[stable(feature = "discriminant_value", since = "1.21.0")]
766766
impl<T> clone::Clone for Discriminant<T> {
767767
fn clone(&self) -> Self {
768768
*self
769769
}
770770
}
771771

772-
#[stable(feature = "discriminant_value", since = "1.22.0")]
772+
#[stable(feature = "discriminant_value", since = "1.21.0")]
773773
impl<T> cmp::PartialEq for Discriminant<T> {
774774
fn eq(&self, rhs: &Self) -> bool {
775775
self.0 == rhs.0
776776
}
777777
}
778778

779-
#[stable(feature = "discriminant_value", since = "1.22.0")]
779+
#[stable(feature = "discriminant_value", since = "1.21.0")]
780780
impl<T> cmp::Eq for Discriminant<T> {}
781781

782-
#[stable(feature = "discriminant_value", since = "1.22.0")]
782+
#[stable(feature = "discriminant_value", since = "1.21.0")]
783783
impl<T> hash::Hash for Discriminant<T> {
784784
fn hash<H: hash::Hasher>(&self, state: &mut H) {
785785
self.0.hash(state);
786786
}
787787
}
788788

789-
#[stable(feature = "discriminant_value", since = "1.22.0")]
789+
#[stable(feature = "discriminant_value", since = "1.21.0")]
790790
impl<T> fmt::Debug for Discriminant<T> {
791791
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
792792
fmt.debug_tuple("Discriminant")
@@ -819,7 +819,7 @@ impl<T> fmt::Debug for Discriminant<T> {
819819
/// assert!(mem::discriminant(&Foo::B(1)) == mem::discriminant(&Foo::B(2)));
820820
/// assert!(mem::discriminant(&Foo::B(3)) != mem::discriminant(&Foo::C(3)));
821821
/// ```
822-
#[stable(feature = "discriminant_value", since = "1.22.0")]
822+
#[stable(feature = "discriminant_value", since = "1.21.0")]
823823
pub fn discriminant<T>(v: &T) -> Discriminant<T> {
824824
unsafe {
825825
Discriminant(intrinsics::discriminant_value(v), PhantomData)

0 commit comments

Comments
 (0)