Skip to content

Commit 1f5d3a9

Browse files
authored
Merge pull request #1750 from durka/patch-8
fix typo in RFC 1696
2 parents c7edf9b + 5b785bc commit 1f5d3a9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

text/1696-discriminant.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ The motivation for this is mostly identical to [RFC 639](https://github.com/rust
2020

2121
The proposed design has been implemented at [#34785](https://github.com/rust-lang/rust/pull/34785) (after some back-and-forth). That implementation is copied at the end of this section for reference.
2222

23-
A struct `Discriminant<T>` and a free function `fn discriminant<T: Reflect>(v: &T) -> Discriminant<T>` are added to `std::mem` (for lack of a better home, and noting that `std::mem` already contains similar parametricity escape hatches such as `size_of`). For now, the `Discriminant` struct is simply a newtype over `u64`, because that's what the `discriminant_value` intrinsic returns, and a `PhantomData` to allow it to be generic over `T`.
23+
A struct `Discriminant<T>` and a free function `fn discriminant<T>(v: &T) -> Discriminant<T>` are added to `std::mem` (for lack of a better home, and noting that `std::mem` already contains similar parametricity escape hatches such as `size_of`). For now, the `Discriminant` struct is simply a newtype over `u64`, because that's what the `discriminant_value` intrinsic returns, and a `PhantomData` to allow it to be generic over `T`.
2424

2525
Making `Discriminant` generic provides several benefits:
2626

0 commit comments

Comments
 (0)