Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/libcore/mem/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -929,8 +929,9 @@ pub unsafe fn transmute_copy<T, U>(src: &T) -> U {
/// See the [`discriminant`] function in this module for more information.
///
/// [`discriminant`]: fn.discriminant.html
// We use `PhantomData<fn(T) -> T>` because we want `Discriminant` to be invariant.
#[stable(feature = "discriminant_value", since = "1.21.0")]
pub struct Discriminant<T>(u64, PhantomData<fn() -> T>);
pub struct Discriminant<T>(u64, PhantomData<fn(T) -> T>);

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

Expand Down