Skip to content

Commit 24c4e26

Browse files
authored
Rollup merge of #44552 - durka:patch-42, r=alexcrichton
update "since" for discriminant_value It's [going](#44263 (comment)) to be backported to beta. r? @alexcrichton
2 parents d73f4dd + 5f43357 commit 24c4e26

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
@@ -712,39 +712,39 @@ pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
712712
/// Opaque type representing the discriminant of an enum.
713713
///
714714
/// See the `discriminant` function in this module for more information.
715-
#[stable(feature = "discriminant_value", since = "1.22.0")]
715+
#[stable(feature = "discriminant_value", since = "1.21.0")]
716716
pub struct Discriminant<T>(u64, PhantomData<*const T>);
717717

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

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

723-
#[stable(feature = "discriminant_value", since = "1.22.0")]
723+
#[stable(feature = "discriminant_value", since = "1.21.0")]
724724
impl<T> clone::Clone for Discriminant<T> {
725725
fn clone(&self) -> Self {
726726
*self
727727
}
728728
}
729729

730-
#[stable(feature = "discriminant_value", since = "1.22.0")]
730+
#[stable(feature = "discriminant_value", since = "1.21.0")]
731731
impl<T> cmp::PartialEq for Discriminant<T> {
732732
fn eq(&self, rhs: &Self) -> bool {
733733
self.0 == rhs.0
734734
}
735735
}
736736

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

740-
#[stable(feature = "discriminant_value", since = "1.22.0")]
740+
#[stable(feature = "discriminant_value", since = "1.21.0")]
741741
impl<T> hash::Hash for Discriminant<T> {
742742
fn hash<H: hash::Hasher>(&self, state: &mut H) {
743743
self.0.hash(state);
744744
}
745745
}
746746

747-
#[stable(feature = "discriminant_value", since = "1.22.0")]
747+
#[stable(feature = "discriminant_value", since = "1.21.0")]
748748
impl<T> fmt::Debug for Discriminant<T> {
749749
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
750750
fmt.debug_tuple("Discriminant")
@@ -777,7 +777,7 @@ impl<T> fmt::Debug for Discriminant<T> {
777777
/// assert!(mem::discriminant(&Foo::B(1)) == mem::discriminant(&Foo::B(2)));
778778
/// assert!(mem::discriminant(&Foo::B(3)) != mem::discriminant(&Foo::C(3)));
779779
/// ```
780-
#[stable(feature = "discriminant_value", since = "1.22.0")]
780+
#[stable(feature = "discriminant_value", since = "1.21.0")]
781781
pub fn discriminant<T>(v: &T) -> Discriminant<T> {
782782
unsafe {
783783
Discriminant(intrinsics::discriminant_value(v), PhantomData)

0 commit comments

Comments
 (0)