Rollup merge of #82184 - petertodd:2021-discriminant-value-doc, r=nagisa

[Minor] Update discriminant_value docs

Updated for new `DiscriminantKind` trait.
This commit is contained in:
Guillaume Gomez 2021-02-16 19:21:21 +01:00 committed by GitHub
commit 9502e5c4dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1688,8 +1688,8 @@
#[rustc_const_stable(feature = "const_int_saturating", since = "1.40.0")]
pub fn saturating_sub<T: Copy>(a: T, b: T) -> T;
/// Returns the value of the discriminant for the variant in 'v',
/// cast to a `u64`; if `T` has no discriminant, returns `0`.
/// Returns the value of the discriminant for the variant in 'v';
/// if `T` has no discriminant, returns `0`.
///
/// The stabilized version of this intrinsic is [`core::mem::discriminant`](crate::mem::discriminant).
#[rustc_const_unstable(feature = "const_discriminant", issue = "69821")]